[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Getting current date and time of a particular time zone
- From: "Jim Whitehead II" <jnwhiteh@...>
- Date: Sun, 17 Aug 2008 10:00:15 +0100
On Sun, Aug 17, 2008 at 9:10 AM, Pete Kay <email@example.com>
Is there anyway to generate the current date and current time given the time zone?
Thank you in advance for your help. Any help will be greatly appreciated.
You can use ! in a format string to os.date, and get the current UTC date/timestamp and then make your adjustements from there. For example:
> = os.date("!%c")
Sun Aug 17 08:59:22 2008
Of course you can do the same when requesting a time table, as in: