Re: timezone anomalies

2008-05-26 Thread Woodchuck
On Sun, 25 May 2008, frantisek holop wrote:

 hmm, on Fri, May 23, 2008 at 11:56:22PM -0400, Woodchuck said that
  Set your camera to UTC and be happy.
 
 and have rubbish exif info in every picture?  no thanks.
 at least that is OS independent and the only correct data
 no matter what.
 
 this is like saying, set your watch to UTC and when
 looking at the time, do the math yourself...

Well, you can lead a horse to water, but you can't make him drink.

man 2 stat.  Read and learn.

Dave



Re: timezone anomalies

2008-05-25 Thread frantisek holop
hmm, on Fri, May 23, 2008 at 11:56:22PM -0400, Woodchuck said that
 Set your camera to UTC and be happy.

and have rubbish exif info in every picture?  no thanks.
at least that is OS independent and the only correct data
no matter what.

this is like saying, set your watch to UTC and when
looking at the time, do the math yourself...

what i am trying to say is, that at least for me it doesn't
make sense by default to apply TZ to files on the disk
(apart perhaps from the newly created ones).

but that's just me, perhaps i'll just set the bios to my
TZ and point /etc/localtime to GMT and turn off ntpd
i prefer my file dates untouched--TZ agnostic, and i hate this
timezone business altogether.

 Among your options, you forgot the whole set of variations where
 the BIOS does daylight/summer time corrections.  Invariably, the
 BIOS is set up for general US rules, and wrong ones at that.

with nptd -s the bios time doesnt matter at all anymore.

-f
-- 
light doesn't emit energy; it emits little dark eaters



Re: timezone anomalies

2008-05-25 Thread Ted Unangst
On 5/25/08, frantisek holop [EMAIL PROTECTED] wrote:
  what i am trying to say is, that at least for me it doesn't
  make sense by default to apply TZ to files on the disk

fortunately, they're not.



Re: timezone anomalies

2008-05-23 Thread Woodchuck
On Fri, 23 May 2008, frantisek holop wrote:

 nor can i recall this ever being an issue while i was in CEST for years.  when
 i copied the camera files they were not off by 1-2 hours depending on daylight
 saving...
 
 -f

Set your camera to UTC and be happy.

The times *in the file system* are in UTC.  They will be displayed in
localtime.  See the source code for ls(1).

Recall that there are (still) large numbers of unix machines which
are used simultaneously by interactive users in different timezones.
On such machines, there is a /etc/localtime for the zone where the
machine resides (or where users think it resides ;-) and users set
TZ in their .profile or similar files.

I'm not aware of cameras that embed zone info in their jpegs.  Are
there such?  Usually you just see a date time thingie.

Among your options, you forgot the whole set of variations where
the BIOS does daylight/summer time corrections.  Invariably, the
BIOS is set up for general US rules, and wrong ones at that.

Only BIOS = UTC makes any sense.  Windoze can get used to it.  BIOS
= localtime is a stupid lazy idea from a place famous for stupid
lazy ideas.

Dave
-- 
   The future isn't what it used to be.
 -- G'kar



timezone anomalies

2008-05-22 Thread frantisek holop
hi there,

today i wanted to copy the pictures from my camera sd card
to my openbsd notebook.  after mounting the card i noticed
that there are files with future dates...

amaaq ls -la /etc/localtime
lrwxr-xr-x  1 root  wheel  36 May 21 12:23 /etc/localtime@ - 
/usr/share/zoneinfo/Pacific/Auckland
amaaq ls -la
-rw-rw-rw-  1 f  wheel906429 May 23 05:36 dscn9996.jpg
-rw-rw-rw-  1 f  wheel877491 May 23 05:37 dscn9997.jpg
-rw-rw-rw-  1 f  wheel915682 May 23 05:38 dscn9998.jpg
amaaq TZ= ls -la
-rw-rw-rw-  1 f  wheel906429 May 22 17:36 dscn9996.jpg
-rw-rw-rw-  1 f  wheel877491 May 22 17:37 dscn9997.jpg
-rw-rw-rw-  1 f  wheel915682 May 22 17:38 dscn9998.jpg
amaaq echo $TZ
amaaq

ls prints the correct date/time when explicitly clearing $TZ.
but there is nothing in it in the first place...

i had different timezones before, but now i am in new zealand...
this has never happened before as far as a i can tell..
ls(1) says that TZ is used to print the dates but it never
occured to me that it would add $TZ hours to the file date,
that's why i am having filedates in the future, obivously,
that the files have correct dates on disk.

is this the accepted behaviour?
the mounts are ext2fs and msdos btw.
4.3-current as of may 19

-f
-- 
how much can i get away with and still go to heaven?



Re: timezone anomalies

2008-05-22 Thread frantisek holop
dual booting with linux these days i am now totally lost.
seems like the xandros distro picks up the how clock
but the set /etc/localtime didn't do anything.  date
shows the same as the bios time...

could the linux dualbooters help me set up the system
so the two os do not fight over time?

what is the proper setup?

bios: UTC
os: timezone

or

bios: localtime 
os: localtime and pretend i am in a timezone? (ntpd gets crazy this way)

or

bios: timezone
os: timezone

-f
-- 
is that a banana in your pocket, or you happy to see me?



Re: timezone anomalies

2008-05-22 Thread Paul de Weerd
On Thu, May 22, 2008 at 02:23:07PM +0200, frantisek holop wrote:
| dual booting with linux these days i am now totally lost.
| seems like the xandros distro picks up the how clock
| but the set /etc/localtime didn't do anything.  date
| shows the same as the bios time...
| 
| could the linux dualbooters help me set up the system
| so the two os do not fight over time?
| 
| what is the proper setup?
| 
| bios: UTC
| os: timezone
| 
| or
| 
| bios: localtime 
| os: localtime and pretend i am in a timezone? (ntpd gets crazy this way)
| 
| or
| 
| bios: timezone
| os: timezone

I don't quite understand these three options you give. Both OS and
BIOS should run in UTC. You configure your environment with TZ which
will default to /etc/localtime. That is, do not explicitly set TZ and
you get the timezone pointed to by /etc/localtime (should be a symlink
to /usr/share/zoneinfo/...), export TZ=Europe/Zurich and get the times
as used in Switzerland. Kernel and NTPd just use UTC.

Cheers,

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/ 



Re: timezone anomalies

2008-05-22 Thread Kevin Wilcox
2008/5/22 frantisek holop [EMAIL PROTECTED]:

 bios: UTC
 os: timezone

This is how I setup all of my *strictly* *nix machines, be they
GNU/Linux or *BSD.

 bios: localtime
 os: localtime and pretend i am in a timezone? (ntpd gets crazy this way)

This is what I do for machines that dual boot MS Windows + *nix.

If the machine were mine, dual booting GNU/Linux and OpenBSD, I'd go
for the former.

Of course, I'm no expert and YMMV.

kmw



Re: timezone anomalies

2008-05-22 Thread Wade, Daniel
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Paul de Weerd
 Sent: Thursday, May 22, 2008 8:40 AM
 To: OpenBSD
 Subject: Re: timezone anomalies

 On Thu, May 22, 2008 at 02:23:07PM +0200, frantisek holop wrote:
 | dual booting with linux these days i am now totally lost.
 | seems like the xandros distro picks up the how clock
 | but the set /etc/localtime didn't do anything.  date
 | shows the same as the bios time...
 |
 | could the linux dualbooters help me set up the system
 | so the two os do not fight over time?
 |
 | what is the proper setup?
 |
 | bios: UTC
 | os: timezone
 |
 | or
 |
 | bios: localtime
 | os: localtime and pretend i am in a timezone? (ntpd gets crazy
 this way)
 |
 | or
 |
 | bios: timezone
 | os: timezone

 I don't quite understand these three options you give. Both OS and
 BIOS should run in UTC. You configure your environment with TZ
 which
 will default to /etc/localtime. That is, do not explicitly set TZ
 and
 you get the timezone pointed to by /etc/localtime (should be a
 symlink
 to /usr/share/zoneinfo/...), export TZ=Europe/Zurich and get the
 times
 as used in Switzerland. Kernel and NTPd just use UTC.

 Cheers,

 Paul 'WEiRD' de Weerd


I know at least for windows it wants to set the BIOS time to local time.  Not
sure how the linux handles it.  If you need/want to have the BIOS time set to
local time, you can adjust OpenBSD to handle that.
http://www.openbsd.org/faq/faq8.html#TimeZone