[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Problem with os.date?
- From: roberto@... (Roberto Ierusalimschy)
- Date: Fri, 15 Sep 2006 11:34:35 -0300
> I was browsing through the code for os.date and spotted the extra
> feature - not mentioned in the book, but in the reference manual,
> that you can use "!" as the first character to use UTC rather than
> local time.
> However if you use that character only, rather than get the default
> date string (%c) in UTC format you get an error about the format
> being too long:
> print (os.date ("!")) --> 'date' format too long
> That message is slightly confusing. Perhaps:
> * Change to %c if the string is empty after removing the !
> * Give an error 'no date string' or similar if the string is empty
> after removing the !
Actually, the message is more than "slightly confusing"; it is plainly
We will fix that, but it seems that the behavior of os.date("!") should
be coherent with that of os.date(""): that is, it should return the