And What About the Internet Date and Time?

Bob Sneidar bobs at twft.com
Fri Aug 19 13:59:23 EDT 2011


I see your point Gregory, but then NOTHING that displays the current date time will display correctly, including the system clock, if the user has the wrong zone selected, and that is the user's fault. For your display only purposes I would say that the current time zone gleaned from the internet time adjusted by the system zone will be fine. If the purpose was to prevent someone from trying to use software that had expired, it would only work for at most a day, and then they would be in the same boat. 

That is why I (and everyone else who wrote a function) got the date and time from an Internet Time Server, and then got the zone only from the system. 

Bob


On Aug 19, 2011, at 10:14 AM, Gregory Lypny wrote:

> Hi Peter,
> 
> Yes, seconds converted from UTC is the only reliable timestamp.  I asked about time zone settings in local machines for display purposes.  We may have a timestamp that is absolutely correct but if that is to be displayed for the user in a LiveCard app on their local machine, say as a confirmation or receipt, it will not display the correct time unless the user’s time zone is set correctly.
> 
> Gregory
> 
> 
> On Fri, Aug 19, 2011, at 12:53 PM, use-livecode-request at lists.runrev.com wrote:
> 
>> AFAIK, It doesn't matter. You can just fetch the universal (GMT) time and convert it to seconds. This will be independent of the time zone the user sets. If someone in Australia submits data one second after someone in New York, the timestamp will be 1313704257 in the first case and 1313704258 in the second case. Ignore the time zone altogether. (Someone correct me if I'm wrong, but I just tested this, changing my time zone in my system settings in between trials, and indeed, the two results were within 30 seconds.)
>> 
>> -- Peter
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list