Time Problem - Help Needed

Everything else that doesn't fall into one of the other PB categories.
AussiePup
User
User
Posts: 19
Joined: Fri Jun 20, 2003 4:47 pm
Location: Chapel Hill, NC

Time Problem - Help Needed

Post by AussiePup »

I wrote a utility that I use to determine whether I need to update a file or not.

The code in question is as follows:

Result = GetFileDate(zfile$,#PB_Date_Modified)
zdate$ = FormatDate("%mm/%dd/%yyyy", result)
ztime$ = FormatDate("%hh:%ii:%ss", result)

I then write zdate$+ztime$ to a text file that can be read from other programs that determine the need for an updated file.

Here is the problem: For some reason that is beyond me, the routine converts the time to GMT time, which in my case is 5 hours later! In some cases, it even causes a date change to the next day!

This is very strange and complicates my life, since to convert back, I would have to determine whether daylight saving time is in effect or not, plus deal with crossing dates, etc., all of which I don't want to do ... never had to do this before in other languages.

Has anyone else run into this? Why not return what is actually in the file, as reported by the file properties? Why do this conversion at all?

Any answers?

Thanks,

AussiePup (I'm in Chapel Hill, NC .. USA, which is currently Eastern StandardTime)
Regards,

Martin
AussiePup
User
User
Posts: 19
Joined: Fri Jun 20, 2003 4:47 pm
Location: Chapel Hill, NC

Re: Time Problem - Help Needed

Post by AussiePup »

I just downloaded and installed 4.41 (I had 4.3?), recompiled and voila! It works properly!

Sorry for any inconvenience .. should have done this first, I guess.

AussiePup
Regards,

Martin
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Re: Time Problem - Help Needed

Post by TerryHough »

Ah Ha! Another NC user of PureBasic. Beginning to think I was the only one.
Post Reply