-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A formatter to match named timezones or their abbreviations, such as GMT #140
Comments
Hi, what do you mean by match? Just eat the string, or actually evaluate the string so it acts as |
In my case I have But your suggestion of ...
-i '<d>%a, %d %b %Y %T %Z</d>' \
-i '<d>%a, %d %b %Y %T GMT</d>' \
-i '<d>%a, %d %b %Y %T UTC</d>' \
... |
I see. I mean you could just not specify it, then (depending on the presence of Using |
In this particular case I'm hoping to convert all timestamps to UTC0, rfc3339. Specifically Many of the formats I deal with follow RFC822 to a degree with inclusion of zone offsets as either |
I see, the case with explicit zone offsets is easy (and already supported) because it's just a calculation. Using zone names isn't too difficult either but I feel quite uncomfortable with the idea of (potentially) opening a new zone file for every line of input. Or, making it as comfortable as possible for the user, you'd have to open all zone files because those daylight saving names are inside the file. And you might need to have more diambiguation measures in place, e.g. for the famous AEST vs EST (Australia) vs EST (North America). |
That does sound fairly onerous certainly (zone files might be amenable to a hash table, but it is pretty large (5M on my system)). I might just stick with my repeated |
I have a few date strings which contain the named zones
GMT
andUTC
. Would it be possible for%Z
to match named timezones or abbreviations asstrftime
does?I realise I could repeat the
-i
flags with bothUTC
andGMT
permuted among them, but that seems a bit awkward.The text was updated successfully, but these errors were encountered: