.51 change attributes: timestamp incorrect

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

.51 change attributes: timestamp incorrect

Post by JRz »

Nikos,

I tried to change the timestamp of a file and discovered the time was off by an hour after the change (+1). I'm in timezone GMT+1 (Just across the Channel :wink: ).

Can it be that you add the correction for the timezone yourself also, so the time gets shifted by 2 hours in stead of 1 ??
Dumb questions are the ones that are never asked :turn:
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

i can't reproduce that
does it happens for all filesystems? (NTFS/FAT32)
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

I reproduced this on my own system (the other one was @work). I'm sorry, I only have NTFS partitions. Both Windows versions are Windows XP Dutch SP1+

It happens when I change the time of a file to say 20:00:00. It appears in X2 with the time set to 21:00:00. When I open the Change Attribute dialog again 21:00:00 is also the time it shows here :?
Dumb questions are the ones that are never asked :turn:
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

Nikos, it has nothing to do with FAT32/NTFS: You are not able to reproduce that because you are straddling the GMT timeline.

In my case, the local time is GMT+5:30 hours. So 5 hours and 30 minutes get added to whatever time I set.

In other words, x2 takes the time as "GMT" and then adjusts the time to the local clock!

So all users across the world (except those on GMT timeline) will have some offset or the other! Some might end up with a different date also! :shock:
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

I figured as much :(

Maybe you're not even aware you're doing it, but Windows takes control??
Dumb questions are the ones that are never asked :turn:
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

And what about the different DST corrections effective across the world? What takes care of that-- Windows or x2?
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

ok, lets call it a bug :oops:
i'll change my timezone and see what happens
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

FWIW ...
I think it's a "feature" of the m$ OS (at least both w2k & XP).
It may tag the files using GMT, and keep track of wheter DST is in currently effect -- BUT does not properly resolve case where current local time is on other side of DST/ST flip-flop compared to original file time.
So I have found that looking at displayed filetime is often off by an hour in whatever file explorer I use. :!:
While I can correlate it with DST/ST, I haven't tried to define exactly when it does/not occur (& it may be across drive partitions -- espec if comparing to files on a mapped drive on a server using more traditional/UNIX file timestamp reporting.) :wink:
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

fgagnon wrote:So I have found that looking at displayed filetime is often off by an hour in whatever file explorer I use.
This is a different matter I think. It's true this happens when you shift files to/from an NTFS partition to/from a FAT16/32 (or even mapped network drives hosted on another platform). Time gets shifted by an hour because of the DST not being supported properly by the underlying filesystems (or I should say: differently than NTFS does).

But my files are all on NTFS partitions and then this 'feature' doesn't occur. Still the change attributes dialog of X2 does produce the offset, even on the same partition (my file isn't moved, just gets a new time).
Dumb questions are the ones that are never asked :turn:
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

JRz- in your case, both GMT offset and DST have exactly the same magnitude: one hour. That is why you are not able to pinpoint the source of this offset. Try some other timezone (US for example) and see.

Also try to set different months (in summer and then winter) to see the effect of DST alone.

From my experience, I can definitely say that the time taken is GMT and then the offset from GMT is added.

But about DST I am not sure. (First of all, there is no DST in my timezone).

My theory is that Windows can never take care of DST, because we define only the offset from GMT when setting up the system clock.

Look, the timeline extends from North Pole to South Pole, and offset from GMT is uniform along it. And that's the only information you give to the OS. Now even along the same timeline, there are different DST policies in place. (see http://webexhibits.org/daylightsaving/g.html) Windows never asks you if you are in the tropics (no DST) or north or south (where some countries have DST).

Then how can Windows guess exactly what is the DST policy where you live?

In other words, you will definitely see some difference vis-a-vis your exact DST time.
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

narayan wrote:Look, the timeline extends from North Pole to South Pole, and offset from GMT is uniform along it. And that's the only information you give to the OS. Now even along the same timeline, there are different DST policies in place. (see http://webexhibits.org/daylightsaving/g.html) Windows never asks you if you are in the tropics (no DST) or north or south (where some countries have DST).
I disagree. You specify exactly in which timezone you are when installing Windows and even more specific where in the world you are!!

For instance: my time settings are set to timezone
(GMT +01:00) Amsterdam, Berlijn, Bern, Rome, Stockholm, Wenen

AND the daylight saving time checkbox is ticked. So Windows knows exactly where I am (at least, where I tell Windows I am) and even knows when to start and stop the DST!!

So your theory is flawed I should think.

My story is confirmed in the following article http://support.microsoft.com/default.as ... -US;129574
Dumb questions are the ones that are never asked :turn:
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

Look at the URL I gave, and you will find that even within a country, some regions do NOT follow DST or at least follow some other DST rule.

Some examples:

* Australia- Some parts have different DST rules.
* Brazil: (rules vary quite a bit from year to year). Also, equatorial Brazil does not observe DST.
* Some parts of the US and Canada do not observe Daylight Saving Time, such as the state of Arizona (US) and the province Saskatchewan (Canada).
* Israel always has DST, but it is decided every year.
* The Antarctic Peninsula (Palmer Station) uses Chile's time zone, the rest of the continent does not. Rothera, a British base, does not implement daylight savings, but instead remains GMT -3. U.S. bases, including both McMurdo and Amundsen-Scott South Pole Station use New Zealand's time zone and daylight saving dates.

How can Windows take care of that variation?

I know of at least one "multi-clock" product that takes care of specific DST zones (it is not generic as Windows):WorldClock (pawprint.net).

There, you simply pick the DST scheme you want. The application does the rest.
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

narayan, you are a walking encyclopaedia :)
Post Reply