Hello all I'm writing some software that deals with dates and I parse Olson files to get time zone information. In the tzfile man page, both entries say that they are used for handling POSIX-style environmental variables? Does that mean that I can ignore those values and assume the transition times are just UAT? I couldn't find any documentation on exactly how to handle these values. The nearest thing I found was the Unix time library which seems to make an adjustment based on one setting, but it wasn't clear if this is done in general or if this was part of some specific handling. Thanks for any help you can provide. Jason
Jason Johnson wrote:
I'm writing some software that deals with dates and I parse Olson files to get time zone information. In the tzfile man page, both entries say that they are used for handling POSIX-style environmental variables?
Does that mean that I can ignore those values and assume the transition times are just UAT?
Sorry, I don't understand your question. For starters, I don't know what "UAT" is. Perhaps you could clarify by giving a specific example.
Oh sorry. I meant Universal Time (UT or UTC). In the documentation it always says GMT but my understanding is that UTC has replaced GMT. In any case, what I'm talking about is in the Olson format, following the ttinfo there are ttisstdcnt boolean values and ttisgmtcnt boolean values. I'm trying to determine if I need to care about these values and if so, then how. There is some evidence [1] that I can safely ignore them, and the man page for the file format seems to indicate that they are used for some kind of POSIX handling that I won't be doing. But the C code appears to do something with them and I've seen one other library that at least recorded the information. Hopefully this is a bit more clear, sorry for the confusion. [1] http://stackoverflow.com/questions/6317388/timezone-database-file-format-que... Sent from my iPhone
On Sep 27, 2015, at 6:48 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
Jason Johnson wrote:
I'm writing some software that deals with dates and I parse Olson files to get time zone information. In the tzfile man page, both entries say that they are used for handling POSIX-style environmental variables?
Does that mean that I can ignore those values and assume the transition times are just UAT?
Sorry, I don't understand your question. For starters, I don't know what "UAT" is. Perhaps you could clarify by giving a specific example.
If I understand your question, you don't need to worry about those flags, as they're used only when decoding incompletely-specified TZ-style strings which is not your problem. Admittedly I am not an expert in this area.
Ok, just to make sure I'm clear: file format is basically a header, followed by the transition times, followed by ttinfo offsets, followed by ttinfo structures, followed by these two sets flags. So your understanding is that those two sets of flags are only for parsing dates and have nothing to do with interpreting the transition times? That would explain what the person on stack overflow saw and fits better with what the man page says (though the man page is still confusing). Then I'll parse the files under this understanding. Thanks for your help. Sent from my iPhone
On Sep 27, 2015, at 9:55 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
If I understand your question, you don't need to worry about those flags, as they're used only when decoding incompletely-specified TZ-style strings which is not your problem. Admittedly I am not an expert in this area.
Ok, thanks for your help. Is there anywhere I can read more about this so I will be able to recognize situations where it might affect me in the future? Sent from my iPhone
On Sep 27, 2015, at 10:23 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
Jason wrote:
your understanding is that those two sets of flags are only for parsing dates
No, it's more complicated than that; but again, I don't think you need to worry about it.
On 09/30/2015 04:53 AM, Jason wrote:
Ok, thanks for your help. Is there anywhere I can read more about this so I will be able to recognize situations where it might affect me in the future?
Not that I know of, sorry. The main documentation is the tzfile man page, and when in doubt just read the source code.
participants (3)
-
Jason -
Jason Johnson -
Paul Eggert