Questions tagged [zoneinfo]
54 questions
13
votes
4 answers
as.POSIXct gives an unexpected timezone
I'm trying to convert a yearmon date (from the zoo package) to a POSIXct in the UTC timezone.
This is what I tried to do:
> as.POSIXct(as.yearmon("2010-01-01"), tz="UTC")
[1] "2010-01-01 01:00:00 CET"
I get the same when I convert a Date:
>…

SiggyF
- 22,088
- 8
- 43
- 57
10
votes
2 answers
Get local time zone name on Windows (Python 3.9 zoneinfo)
Checking out the zoneinfo module in Python 3.9, I was wondering if it also offers a convenient option to retrieve the local time zone (OS setting) on Windows.
On GNU/Linux, you can do
from datetime import datetime
from zoneinfo import…

FObersteiner
- 22,500
- 8
- 42
- 72
8
votes
1 answer
where are the leap seconds in javascript?
When I use
a custom zoneinfo file for TAI or /usr/share/zoneinfo-leaps and
a modified NTP client (currently it just adds 27 seconds; and waits for a time stamp that is about 1 second off)
on my ArchLinux box,
the system time behaves nicely:
>…

RRIDDICC
- 81
- 4
6
votes
3 answers
How can i convert time zone string to the TimeZone Object in java?
I have several time zone strings in UTC format, such as "UTC+08:00", "UTC-05:00", the question is how can i convert these utc format strings to the java.util.TimeZone in Java?
I have tried to convert by ZoneId as follows, but it did not work:
ZoneId…

Jianeng Xu
- 107
- 1
- 9
5
votes
1 answer
New java time zone info file is not supporting AEST/AEDT
http://www.oracle.com/technetwork/java/javase/tzdata-versions-138805.html
In above link of Oracle website they say that From version tzdata2014f, Java is supporting AEST/AEDT instead of EST for Australian timezone but I have current tzdata2014i…

Benny Nagraj
- 51
- 1
- 2
4
votes
1 answer
Python 3.9: Construct DST valid timestamp using standard library
I would like to contruct DST-valid timestamps only using the standard library in Python 3.9 and was hoping this was possible with this version.In my timezone "Europe/Berlin", the DST crossings for 2020 are:
2020-03-29 at 02:00 the clock switches to…

Fab
- 213
- 3
- 15
4
votes
5 answers
How do I determine the system's Olson zoneinfo in JavaScript?
I'm interested in retrieving the current zoneinfo string ("America/Los Angeles", "Europe/London", etc.) that the user currently has set for their OS in JavaScript. I've found how to get the current offset in seconds, offsets at specific dates, and…
Nick Dresselhaus
4
votes
1 answer
How can I map tz database names to city and country names?
Is there a publicly available mapping from tz database (aka zoneinfo database, aka Olson database) IDs to city and country? For example:
"Pacific/Auckland" => "Auckland, New Zealand"
"Europe/Copenhagen" => "Copenhagen, Denmark"
"Europe/Paris" =>…

Simon Cave
- 3,971
- 4
- 24
- 28
4
votes
2 answers
Library/code for dynamically reloading the /usr/share/zoneinfo database?
Since the system /usr/share/zoneinfo database is updated fairly frequently, I would like to be able to load it (and reload it) dynamically in a very long running C++ program.
Now I know the standard library will use this database, but I doubt it…

Eloff
- 20,828
- 17
- 83
- 112
3
votes
3 answers
exchangelib and pyinstaller - zoneinfo - tzdata - UTC issue
In my python project, I'm using exchangelib and I needed to create an exe file.
Using pyinstaller --onefile I had UTC errors (in general tzdata)-
"No timzone in key UTC".
Simplifying all and following this…

Fabio Fracassi
- 289
- 3
- 7
3
votes
1 answer
Go doesn't find /usr/share/zoneinfo in docker container
In a Go program I call time.LoadLocation("Europe/Berlin") and it returns an error saying open /usr/local/go/lib/time/zoneinfo.zip: no such file or directory, even though in the container (running alpine:3.9 with tzdata installed)…

rausch
- 3,148
- 2
- 18
- 27
3
votes
1 answer
Detect if ZONEINFO fails in Go
In Go, you can specify a specific zoneinfo.zip file to be used by adding a ZONEINFO environment variable that points to the specific file you'd like to use for time zone information. This is great as it allows me to ensure that the versions of the…

Slotheroo
- 925
- 2
- 9
- 17
3
votes
1 answer
Android emulator hangs with multiple errors
I built Android from source and when I execute the emulator it hangs on the android splash page. Details…

3laz3r
- 83
- 9
2
votes
2 answers
Can I determine the ZoneInfo from an IPAddress?
is there anyway I could figure out an estimated (Olson) ZoneInfo value (eg. ("America/Los Angeles", "Europe/London", etc.), for a single public IP address ... in .NET?
I already have a full list of ZoneInfo values, so that's not a problem ... and in…

Pure.Krome
- 84,693
- 113
- 396
- 647
2
votes
1 answer
Is `pytz` deprecated now or in the future in Python?
pytz is used in the Django version: <=3.2 doc Selecting the current time zone as shown below:
import pytz # Here
from django.utils import timezone
class TimezoneMiddleware:
def __init__(self, get_response):
self.get_response =…

Super Kai - Kazuya Ito
- 22,221
- 10
- 124
- 129