12,585 questions
2
votes
1
answer
73
views
ImportError in old migrations (django.utils.timezone.utc) after upgrading Python and Django
I recently upgraded my project from Django 3.2 to Django 5.2 and also updated Python to 3.13.
During this process, I noticed that some of my old migration files do not explicitly import timezone from ...
0
votes
1
answer
65
views
ZoneInfoNotFoundError: No time zone found with key 'Asia/Taipei' when using APScheduler on Windows
I'm using APScheduler 3.10 in a FastAPI app on Windows and getting this error when passing a timezone string.
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler....
4
votes
1
answer
223
views
How do I get the timezone without checking the time?
Irrespective of computing, the timezone depends on where you are located, and not on the current time (ignoring things like Daylight Savings Time and historic adjustment of timezone boundaries). On ...
0
votes
1
answer
84
views
PostgreSQL (PolarDB PG 16) SELECT now() always returns Asia/Shanghai timezone via JDBC, even when DB timezone is UTC
I’m using PolarDB for PostgreSQL 16 and a Java application with the PostgreSQL JDBC driver.
In my Java code, I run a simple query:
String query = "SELECT now();";
try {
conn2 = driver2....
Best practices
1
vote
4
replies
97
views
Should I use ETC/Zulu or Zulu?
I'm developing a virtual airline system with PHP. Is there a difference between ETC/Zulu and Zulu in PHP's supported timezone list? Which one should be used?
0
votes
1
answer
97
views
PostgreSQL function returns date format differently from table
In PostgreSQL (using DBeaver as a client), when I return the same query from a function as from a table for a timestamptz field, the time element appears differently (and is then handled by downstream ...
1
vote
1
answer
100
views
Timezone Conversion Bug When Scheduling Across Day Boundaries Flutter
I’m trying to implement timezone-aware scheduling in our app. The app is used in multiple countries, so users can choose a location and schedule a mission, for example, Tuesday at 10:00 PM in New York....
0
votes
0
answers
52
views
Grails 2.5.5. How to convert java.util.Date in UTC that comes from date.struct with locale values
GrailsParameterMap converts date.struct to java.util.Date automatically, using specifically StructuredDateEditor class.
https://github.com/apache/grails-core/blob/v2.5.5/grails-web-common/src/main/...
3
votes
1
answer
124
views
Kazakhstan time zone discrepancy on Linux and Windows
Kazakhstan switched to a single timezone on March 1, 2024. I also found Microsoft Update about this.
In .NET8 WebApi application I have this method:
private static string ProcessTimeZone(string ...
1
vote
2
answers
130
views
C# TimeZoneInfo.ConvertTimeToUtc() not working for pre-transition times
C# .NET 8 appears to be mishandling conversion of local times to UTC for times 12am..2am on daylight saving transition days. E.g.
var fallBack = new DateOnly(2026, 10, 25);
var tzi = ...
1
vote
1
answer
72
views
dayjs.utc().tz() calculates wrong ISO week in production but works correctly locally
I'm encountering an issue where isoWeek() calculation returns incorrect results in production but works correctly in my local environment. The problem occurs when converting a MongoDB Date object to a ...
0
votes
1
answer
72
views
Does anyone actually rely on Oracle DBTIMEZONE in production? (Context: DB Monitoring Tool Development [closed]
I am a database monitoring tool developer based in South Korea. I am currently reviewing time-related metrics and configurations for Oracle Databases to ensure our monitoring solution interprets time ...
0
votes
0
answers
78
views
Flutter zoned scheduled notifications work in foreground/background but unreliable in terminated state on real Android device
I’m working on a Flutter reminder app using scheduled local notifications.
Behavior I’m seeing
On emulator
Works in foreground
Works in background
Works in terminated state
Notifications fire ...
0
votes
0
answers
40
views
Apache Calcite Druid Adapter: FLOOR with time arithmetic fails to determine valid origin
I’m trying to execute the following query on a Druid datasource using Apache Calcite:
SELECT
FLOOR(
("__time" + INTERVAL '5' HOUR + INTERVAL '30' MINUTE)
TO DAY
) AS "...
Best practices
3
votes
4
replies
263
views
PostgreSQL: Should I store timestamps as UNIX epoch or timestamptz?
I'm dealing with a timezone issue in a PostgreSQL project and would like some advice.
I'm currently choosing between two ways to store timestamps:
1. UNIX timestamp (bigint)
Very safe in terms of ...
2
votes
1
answer
94
views
Storing store time of day ranges where timezone matters
I need to store some store hours that exist in different time zones and may be interacted with in different timezones through an admin portal where it will display store time and local time.
I know ...
1
vote
0
answers
99
views
why do I get timezone [duplicate]
Can someone explain why my timezone shows 04:56 instead of 04:00?
import datetime as dt
import pytz
zone = pytz.timezone("America/New_York")
pre_timechange = dt.datetime(2025, 11, 2, 1, 59, ...
Best practices
0
votes
3
replies
169
views
Converting place/location into timezone
I am using XYZ geoLocation IP details provider API and it giving output in below format
{
"ipAddress": "66.XXX.YY.XXX",
"network": "66.XXX.YY.Z/AB",
...
1
vote
1
answer
155
views
Pandas's to_datetime function and datetime format
I have a .csv file with two columns (Date and Time). The time zone is "Europe/Paris" with a +02:00 hours shift. The file is structured in 2 parts with two datetime formats.
Date
Time
08-11-...
1
vote
0
answers
44
views
Django timestamp__date filtering works locally but returns extra rows in production?
I have a Django API that returns self signedup users in a given date range. The AuditLog model stores timestamp with DateTimeField(default=timezone.now) and USE_TZ=True.
Locally, the date filter works ...
1
vote
1
answer
64
views
Python: Converting string in NZ summer time to UTC gives wrong result
I am creating a simple script where I need to convert
strings with date and time given in NZ time to corresponding
UTC time.
The time series are done in NZ summer (Dec-Feb) and hence the
NZ time is 13 ...
3
votes
1
answer
160
views
Noda Time reporting incorrect timezone (Unity - iOS/Android)
I'm working on a project where I need to get the current timezone of a device in IANA format in a Unity App for iOS and Android. I have so far tried using TimeZoneInfo which doesn't give the timezone ...
0
votes
1
answer
71
views
How to add last24hour filter in a Netsuite script saved search?
I am trying to filter vendors activated/inactivated in last 24 hours. But I tried lot but not getting any results, whereas there are few vndors activated in last 24 hours in Netsuite account. Please ...
1
vote
1
answer
70
views
Trying to convert .NET Ticks to Central Time but without the offset
In a SELECT statement I want to convert .NET ticks to a datetime and display in Central Time. I don't want the timestamp+offset that "AT TIME ZONE 'Central Standard Time'" gives, I just want ...
1
vote
0
answers
42
views
Laravel 12: Run scheduled command at 07:00 UK time while server is on UTC
I’m using Laravel 12 and I want to run a scheduled command every day at 07:00 UK (Europe/London) time, but my server is configured with UTC timezone.
In my bootstrap/app.php I have and its working:
$...
0
votes
0
answers
179
views
Robocopy algorithm for /FFT and /DST options
Microsoft's Robocopy program has these two options:
/FFT :: assume FAT File Times (2-second granularity).
/DST :: compensate for one-hour DST time differences.
What is the exact algorithm that ...
1
vote
1
answer
110
views
How to get a billing cycle period between the 26th of the previous month and the 25th of the current month using Python (timezone-aware)?
The Problem
I'm building a billing system in Django, and I need to calculate the billing period for each invoice.
Our business rule is simple:
The billing cycle starts on the 26th of the previous ...
0
votes
1
answer
129
views
Why is the time zone in Google Sheets set programmatically via Apps Script not reflected in settings of the spreadsheet?
I am trying to set a time zone for a Google spreadsheet programmatically.
function setTimezone() {
const name = 'test';
const file = getFileByName(name);
const ss = SpreadsheetApp.open(file);
...
-2
votes
2
answers
309
views
Why does Java Date always display in system time zone instead of UTC?
I am working on a Java 8 application where I receive epoch millisecond timestamps that represent UTC time. I need to pass these timestamps as Date objects to a method that I do not control (from a ...
3
votes
1
answer
469
views
How to get canonical IANA timezone ids in javascript
How would I get a list containing only and all canonical IANA time zone ids in javascript?
While I fully intend to support all IANA time zone ids in my application, when users select a timezone, I ...
2
votes
1
answer
97
views
Editing "parts" of a TIMESTAMPTZ value
I have a TIMESTAMPTZ column in a Postgresql database. To my understanding, Postgresql does not preserve the timezone within a TIMESTAMPTZ column, and instead converts the given timestamp to an ...
1
vote
0
answers
31
views
GridDB time-series query skips rows with millisecond timestamps (Java API)
I'm testing GridDB Community Edition 5.3 (Linux container via Docker Desktop on macOS 14.4, Apple M1).
When I insert rows with millisecond timestamps into a time-series container, and query using a ...
1
vote
1
answer
142
views
Pino logger timezone is not lined up with system timezone
There is Fastify app with pino logger on AlmaLinux 9.2 using pm2.
$ timedatectl:
Local time: Mon 2025-06-09 22:23:54 +05
Universal time: Mon 2025-06-09 17:23:54 UTC
RTC time: Mon 2025-06-09 17:23:...
0
votes
1
answer
141
views
Are DBT snaopshots using check strategy capture valid from/to as UTC?
I'm using dbt cloud to generate snapshots to track SCD on a table, uing the check strategy (as I don't have an updated_at column in my source table) - this works well, and every change captures a new ...
3
votes
1
answer
256
views
How does Java handle the timezone database? [closed]
I know that IANA keeps a timezone database (tzdata) that is used by several systems. But Java seems to have its own mechanics to handle timezones.
How does it work?
0
votes
0
answers
109
views
Configure NodeJS default time zone inside docker container [duplicate]
I'm having trouble to configure my node environment to use the same timezone as my docker container.
FROM node:20-alpine
WORKDIR /app
RUN apk add --no-cache chromium openssl tzdata
ENV TZ=America/...
0
votes
1
answer
80
views
Is it possible to use DRF's datetime picker and include the UTC offset for timestamps in the response JSON?
I am trying to use the Web browsable API in Django Rest Framework. I have objects with timestamp data in this format, "2025-05-08T22:02:58.869000-07:00". But the required format for Django'...
0
votes
1
answer
124
views
Get the canonical timezone name of a backward linked timezone in python?
As title said, I'm looking for a simple way to get the canonical name of a timezone when providing a timezone name.
For example Asia/Calcutta is the backward liked name of Asia/Kolkata.
I'd expect ...
-3
votes
1
answer
47
views
How we can manage multiple timezone using mongodb timestamps [closed]
So, I am trying to manage multiple timezone in my nodejs project, I am unable to get results from mongodb timestamps according to timezone that user have selected. Need support to setup an enviorment ...
0
votes
1
answer
107
views
How to properly handle dates with Laravel?
So, I'm working with Laravel. My project is set to the TIMEZONE: UTC.
When I consume my project's API on a Flutter mobile application, for example, I convert the dates received from the server in UTC ...
3
votes
2
answers
74
views
Jquery datetimepicker last day of month not working
I have a filter page with 2 datetimepicker as Start date (first day of month) and End date (last day of month). This is what I'm trying to do:
$(document).ready(function () {
var date = new Date(...
3
votes
1
answer
214
views
Intl.DateTimeFormat: Why is timeZoneName: "shortOffset" is having a different value in different languages
We are currently exploring showing timestamps with time zone to our users and decided to go with the Intl.DateTimeFormat option timeZoneName: "shortOffset" but we now noticed that the value ...
0
votes
1
answer
192
views
Plotly date display using UNIX timestamp data in browser timezone
My data comes as a Pandas DataFrame with a datetime index, that is generated from UNIX timestamps. I would like to display the data in a Plotly chart in the browser's timezone, but haven't figured out ...
0
votes
1
answer
96
views
Time Zone name to Internalization [duplicate]
Intl.supportedValuesOf('timeZone')
Above code will give list of all time zone in en-US like below
["Africa/Abidjan", "Africa/Accra" , "Africa/Addis_Ababa", ...]
Is ...
2
votes
1
answer
72
views
Getting an error when defining timezone for R sunrise function in bioRad package
I have a dataframe of locations and dates across the US for which I want to retrieve the time of sunset. I used tz_lookup_coords in the lutz package to define the timezone based on location, but when ...
0
votes
0
answers
58
views
Chartkick time zone aware labels with time series
I'm using Chartkick 5.1.4 with Rails and code like the following in my view:
<%=
line_chart(
charts_data_last_1_hour_path,
:refresh => 60,
...,
:library => {
:scales =...
0
votes
0
answers
130
views
pytz library timezone conversion issue [duplicate]
I am trying to work with django and converting timezones between UTC and my timezone ("America/Winnipeg"), but I keep running into issues and I think there might be a bug. Here is my code:
#...
2
votes
1
answer
94
views
Why datetime.datetime.strptime %Z code doesn’t produce an aware object?
A little example:
$ python
Python 3.13.2 (main, Feb 5 2025, 08:05:21) [GCC 14.2.1 20250128] on linux
Type "help", "copyright", "credits" or "license" for more ...
0
votes
0
answers
269
views
Why does my spoofed browser timezone still reveal the actual timezone?
TL;DR: I'm just wondering if there are any other ways for the server to obtain the client's timezone aside from using Date() and Intl.DateTimeFormat.
The detection test I want to pass is at https://...
0
votes
1
answer
273
views
Invalid time zone in BigQuery
Since the last update in tzdata previous week (2025b - March 22, 2025), a new timezone named America/Coyhaique was introduced.
However, BigQuery still doesn't support it and produces an error when ...