date anomalies when converting to seconds
Jim Ault
JimAultWins at yahoo.com
Mon May 22 12:37:53 EDT 2006
If you look in the archives, this topic was recently discussed fairly well.
The operating systems do date and time and daylight savings differently.
This is inherent in each system. If these calculations are critical to your
operation, you should invest a bit of time building a small date-time
library to add to your distribution.
Hopefully you will find all the data you need to answer your questions,
especially if you are going to rely on the users computer settings as being
accurate and in their time zone.
Look at the automatic daylight savings time adjustment for each operating
system, and in other countries, see which day this is invoked.
Jim Ault
Las Vegas
On 5/22/06 8:39 AM, "Chris Sheffield" <cmsheffield at gmail.com> wrote:
> This is one for those of you developing for both Mac and Windows. I'm
> running into a very strange problem, and I'm not sure if it's a Rev
> bug or if it has something to do with hardware differences between
> Macs and PCs.
>
> Here's a code snippet:
>
> put "01/06/2006" into tDate
> convert tDate to seconds
> put tDate
>
> Run this in the message box on both a Mac and a PC. See the different
> results. Anyone know why this would happen? What I'm ultimately doing
> is converting two dates to seconds and then calculating the number of
> weeks that have passed between the two dates. I discovered that my
> calculations were incorrect on the PC, and my debugging led me to
> this. The value on the Mac seems to be the correct one. What's
> strange is some dates seem to be correct when converting to seconds,
> but others are not. Try "04/28/2006" for example. Converting to
> seconds results in the same value on both platforms.
>
> Can anyone help with this? Or does anyone have another way of
> calculating the number of weeks between two dates without converting
> to seconds first? Have I found a bug I need to report?
>
> Thanks,
> Chris
>
> ------------------------------------------
> Chris Sheffield
> Read Naturally
> The Fluency Company
> http://www.readnaturally.com
> ------------------------------------------
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list