-
March 25th, 2005, 01:43 PM
#1
datediff and daylight saving
If you use date diff to find a number of seconds :
secs=DateDiff("s", #1/1/2000#, Now) does Vb take note of auto daylight saving?
If you call on this line before and after the clock change, does it return a value less or plus 3600? (which could lead to apps thinking that tomorrow has appeared before the end of today)
Or is VB sensible and always refers itself to GMT if given a date literal and then automatically adjusts?
Does anyone know?
-
March 25th, 2005, 04:27 PM
#2
Re: datediff and daylight saving
All vb Date functions seem to depend on system settings in one way or another, as far as I've observed. The Format$() function can change the way dates are formatted, but still there are system settings which can effect it. One way to test for DateDiff() and daylight savings would be to get the difference one minute before and after the time change, and see if it accounts for it.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
March 25th, 2005, 06:58 PM
#3
Re: datediff and daylight saving
well I just lied to my computer and told it that it was 2 minutes to daylight savings time.
I then clocked in on a timekeeping app which measures time as seconds from a date literal (in this case #1/1/2000#) . (00:58 gmt)
After the clock had dutifully jumped forward an hour i clocked out again (02:01 BST)
When I looked at the time total, the computer had added 3780 seconds.
So there`s a bit of an answer.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|