Old 10th December 2004, 23:31   #1
FileAnt
Junior Member
 
Join Date: Dec 2004
Location: Emerald Beach
Posts: 2
GetFileTime and daylight savings

I use the following code for files without versions, but after my computer entered daylight savings it is out a bit. Is there a way to filter out the time or should I be using GetFileTimeLocal?

ReadINIStr $3 "$INSTDIR\update.ver" "files" "$1"
ReadINIStr $5 "$INSTDIR\update.ver" "path" "$3"
ReadINIStr $4 "$INSTDIR\update.ver" "hw" "$3"
GetFileTime "$5$3" $R0 $R1
IntCmp $4 $R0 haslatest haslatest dldatezip

This may also be the cause...

ZipDLL::extractfile "$INSTDIR\updates\$1.zip" "$TEMP" "$3"
Delete /REBOOTOK "$5$3"
Rename /REBOOTOK "$TEMP\$3" "$5$3"
FileAnt is offline   Reply With Quote
Old 11th December 2004, 07:21   #2
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Yes, daylight saving is a part of 'local time'.
Related thread http://forums.winamp.com/showthread....highlight=time
Takhir is offline   Reply With Quote
Old 11th December 2004, 11:36   #3
FileAnt
Junior Member
 
Join Date: Dec 2004
Location: Emerald Beach
Posts: 2
A quick and dirty method. I needed to divide both $4 and $R0 by a number to get an integer result that would always be the same.

I think this is resolved to 48 hours... do you think i could resolve it to 24 hours?... my mind boggles when i try to think about the earth spinning in timezones.

IntOp $4 $4 / 384
IntOp $R0 $R0 / 384

When I test the generic updater nsi i will post the code on my website when I get time, with an update builder which is pretty cool and almost makes it a one step, one second process. Maybe early next year.
FileAnt is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump