Skip to main content

Questions tagged [timezone]

A time zone is a region on Earth that has a uniform, legally mandated standard time. It is often represented by an identifier, such as "America/Los_Angeles". Do not mistake an offset such as -07:00 as a time zone. A time zone is much more than that. Please read the entire tag wiki for details.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
51 views

Date Object time zone in Javascript [closed]

Knowing that in JavaScript the Date constructors and methods are affected by the client’s local time zone, and therefore, creating a Date object using user input data will reflect the client’s local ...
Es Noguera's user avatar
-6 votes
1 answer
36 views

how to extract the local time and year when given a UTC time in milliseconds and the timezoneOffset?

In javascript, one is given: UTC milliseconds since 1970 timezoneOffset of the local timezone From the above, how to extract the local time and year implied by the timezoneOffset?
Bear Bile Farming is Torture's user avatar
0 votes
2 answers
22 views

How to configure javascript pg library to interpret timestamps without timezone as UTC timestamps when reading from postgres

My computer timezone offset is UTC/GMT +3 hours. My table in database is defined as such. CREATE TABLE public.order_invoices ( created_at timestamp NOT NULL, updated_at timestamp NOT NULL, ...
korulis's user avatar
  • 194
0 votes
0 answers
30 views

Storing time and timezone data in PostgreSQL

Our users should be able to configure a time-in-day, and a timezone, by which they want to get daily updates. The updates should contain data that will be presented in their timezone of choice. For ...
galah92's user avatar
  • 3,823
1 vote
0 answers
27 views

Save DateTime in mysql database based on Asia/Tehran time zone

I have a Django project where I have used a DateTime field in one of its models. In this database field, I want to save the date and time of this moment. Also, my database is mysql type and on the ...
MrMrProgrammer's user avatar
-3 votes
1 answer
39 views

Android always getting hour of device instead hour of zone [closed]

When device hour is changed and is not automatic manual, I'm trying with my application android getting the hour of zone, I'm always getting hour of the device, i want to get the correct time zone ...
tamtoum1987's user avatar
  • 2,035
-3 votes
0 answers
110 views

Java Date.toString() method produces two different results on different linux servers

We are getting "org.postgresql.util.PSQLException: ERROR: invalid input syntax for type timestamp: "Wed Jun 26 23:27:35 TRT 2024"" as an exception when our application tries to ...
enanas's user avatar
  • 37
1 vote
0 answers
42 views

Issue on date Handling || Time travel Bugs || Middleware || Better Approach

Issue: The server defaults to the African time zone, and the user receives their time in this zone, despite the existence of middleware in the PHP Laravel code. class UpdateTimezoneMiddleware { /**...
DData Science's user avatar
1 vote
1 answer
25 views

Dayjs wrong timezone conversion

// DATE = 2024-06-13T23:59:59+05:00 let dateTime = dayjs(date, format, locale, strict); // +05 UTC OFFSET dateTime = dateTime.utcOffset(300); console.log('1 - ', dateTime.format()); // ...
Hoppe's user avatar
  • 31
0 votes
1 answer
32 views

How to set timezone for ActiveRecord queries to fetch the accurate figures?

I am building a Rails 7 app that is targetted for the German audience. My current local German time is Fri Jun 21 12:10:23 CEST 2024 (output from date in terminal). When I log in to my production ...
user984621's user avatar
  • 47.7k
0 votes
0 answers
22 views

python datetime timezone converted is not really changing anything except the timezone label? [duplicate]

I am US/Pacific timezone (and my devices are too). import time import pytz from datetime import datetime from datetime import timezone from zoneinfo import ZoneInfo tz_pac = pytz.timezone('US/Pacific'...
lolo's user avatar
  • 33
1 vote
0 answers
29 views

Why does the events in RRule offset by whole 1 day in cases where timezone conversion to UTC was next day?

I have a calendar that shows the recurring events using the RRule. I am on PST timezone so the calendar is also on PST. When I create a RRule with dtstart where the PST to UTC conversion DOES NOT ADD ...
Psth's user avatar
  • 300
4 votes
4 answers
94 views

Does anyone know PHP code to correct the conflictive time change in a country?

For example, when a country changes time, there are 2 possibilities: 1.- If it changes to an earlier time, for example, at 3 Am in Central Europe, the last Sunday in October at 3 Am becomes 2 Am, ...
Jaime Reynolds's user avatar
1 vote
3 answers
74 views

issue with time zones in dataframe and POSIXct data

I have a bunch of timedates with different time zones - I am able to generate a dataframe with these as different columns. It looks something like this: timedate <- c("2024-03-31T03:14:00"...
fake fake's user avatar
0 votes
1 answer
40 views

Django ORM Query aggregate datetime + timeoffset and filter on new value

I've the following table structure (note localised start time): id start_time offset score 1 2024-06-14 02:03:00.000 +0200 +1000 15 2 2024-06-14 02:04:00.000 +0200 +1000 15 3 2024-06-14 02:05:00....
matta-pix's user avatar
1 vote
0 answers
37 views

How to prevent converting to UTC in the dayjs plugin?

There is a code: import * as dayjs from 'dayjs'; import * as utc from 'dayjs/plugin/utc'; import * as timezone from 'dayjs/plugin/timezone'; dayjs.extend(utc); dayjs.extend(timezone); //... console....
  Kit's user avatar
  • 11
-1 votes
1 answer
60 views

Get timezone for specific date

I have a list of dates formatted like so: '2024-01-01` I need to turn them into ISO datetimes like so: `2024-01-01T00:00:00-08:00` I thought this would be easy, I was wrong. I've seen many ...
Jamie Marshall's user avatar
0 votes
1 answer
17 views

Determine if daylight savings is in use when converting time in BigQuery

I am trying to convert the timestamp associated with GA4 event data in BigQuery from UTC to my timezone. I can easily do this with the following expression: FORMAT_TIMESTAMP('%Y-%m-%d 00:00:00', ...
DrPaulVella's user avatar
1 vote
3 answers
47 views

Indexing a Timezone-aware Datetime index

I have a simple code (that worked fine) for grabbind the dividend data from yfinance. The code takes te dividend data from the start to end date (which is by default set to today). I am using Python 3....
Blaz's user avatar
  • 57
1 vote
1 answer
62 views

Rust Local time always returns UTC on target

The following code works fine on my host system use chrono::{Local}; fn main() { let local_dt = Local::now(); println!("local_dt {}", local_dt); } local_dt 2024-06-10 16:13:46.339768796 -...
Tim Ross's user avatar
0 votes
0 answers
46 views

Laravel 11 Carbon return different timezone for timestamp columns with same output formatting

I have model with several timestamp columns - created_at, updated_at and published_at. In migration I have: $table->timestamp('published_at')->nullable(); $table->timestamps(); On the model ...
exem's user avatar
  • 21
0 votes
1 answer
28 views

C# setting or update only the timezone value, not converting

I am constructing a new C# DateTime from int values for year, month, day, hours, minutes & seconds. The values are already adjusted for the destination timezone. (I cannot change that. I am given ...
Tolga Köseoğlu's user avatar
0 votes
2 answers
87 views

TimeZones In Laravel Application

I have made a laravel application which save data in db as UTC. My client is in South Africa and he wants the records to be displayed in South Africa timezone. Any body guide me related to this. ...
Tallal Saghir's user avatar
-2 votes
1 answer
81 views

LocalDateTime - issue in time display in database

I need to save a date with time in an Oracle database. I have used LocalDateTime in my entity, and the date with time is showing correctly in the Eclipse console, but there is a mismatch in time when ...
Santosh Kshirsagar's user avatar
0 votes
0 answers
15 views

Email was delayed in WP project

I have a WP project that have several cron jobs such as sending email to admin's email address everyday. This email is a kinda reports of the website so it's a bit important for me. I am currently ...
Hot Coding's user avatar
0 votes
2 answers
52 views

convert timestamp with offset to utc timestamp in python?

I have a dataframe with a column in it - date_col 2024-05-12T17:46:50.746922-07:00 2024-05-12T17:31:35.438304-07:00 2024-05-12T17:46:50.642095-07:00 2024-05-12T17:02:02.299320-07:00 I tried below ...
emiley mille's user avatar
1 vote
1 answer
45 views

zoneinfo is missing timezone names that pytz has

I am comparing the timezone names that pytz and zoneinfo support because I would like to transition to zoneinfo from pytz. It seems that zoneinfo lacks a lot of timezones: >>> import pytz >...
User's user avatar
  • 14.6k
0 votes
1 answer
48 views

How to get a list of timezones in Postgresql with full timezone name?

I found a list of timezones in the Postgresql docs for an older version https://www.postgresql.org/docs/7.2/timezones.html I want that same list but for the current version. I ran the following code ...
volume one's user avatar
  • 7,345
1 vote
2 answers
41 views

How to remove tzname string from tzinfo?

In Python, I want to remove the string of timezone name in tzinfo: import datetime x = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo Where x is: datetime.timezone(datetime....
Greenhill's user avatar
  • 149
0 votes
2 answers
107 views

Update the ICU and Timezone repositories for the AOSP on Android 9

I work on the AOSP changes for the tablet device we develop. It's based on Android 9 system. And it should support the latest time zones. The ICU repository we use currently: https://android....
dimetil's user avatar
  • 3,871
0 votes
0 answers
30 views

A MongoDB collection doesn't always accept newly inserted documents after TTL was set on the collection

I'm using MongoDB with a FastAPI application to manage an unverified_users_collection. I have set a TTL (Time-To-Live) index of one day on the createdAt field to automatically remove documents after ...
A_Jay's user avatar
  • 1
1 vote
0 answers
63 views

Is there a way to ensure an XML DateTime prop is serialized to wintertime if the date is during wintertime?

An XmlSerializer keeps serializing datetime's to summertime(+2) instead of wintertime) if the XmlModel has a property with the XmlAttrib with "DateType=Time" configuration. The date ...
Simulan88's user avatar
-1 votes
1 answer
34 views

Rust Chrono parse date String, ParseError(NotEnough) [duplicate]

How to Convert a string like "2020-04-12 22:10:57 UTC" to Chrono::DateTime ? Code: #[test] fn t() { let date_str = "2020-04-12 22:10:57 UTC"; let datetime = DateTime::...
grooby's user avatar
  • 1
0 votes
0 answers
43 views

CURENT_DATE does not return the date and time in the local time zone in Oracle Forms

We are moving our Oracle Forms application to OCI (Oracle Cloud Infrastructure) which always runs in UTC time. Previously all our servers were in our local time zone, so we didn't need to be concerned ...
Tim Daniell's user avatar
0 votes
0 answers
23 views

Converting time from utc in linux results in unspecified kind

I am hosting the .NET core app on Linux and I have an issue when converting UTC time to some other zone, the time has an unspecified kind. I found similar questions where issue was regarding timezones ...
chessGeek's user avatar
0 votes
1 answer
53 views

postgresql timestamptz conversion to localtime issue

i have two environments as below pre_prod - ubuntu , postgres:12.18 prod - ubuntu, postgres:12.18 i am facing very peculiar issue in both environments. in pre_prod. my timestamptz value is ` ...
pappu_kutty's user avatar
  • 2,394
0 votes
0 answers
29 views

Migrating to TZ aware datetime in Django, PostgreSQL timestamp

I use Django ORM to access PostgreSQl data. Database is relatively big ~100 tables, some with dozens of millions of records. I'm switching from Django 4.2 to Django 5.0, which has USE_TZ = True by ...
Igor Kramaric's user avatar
0 votes
1 answer
36 views

offsetting a dateTime object ub VB.net

Suppose we need to get a fixed time such as 1600 eastern Time in local-time. I have found the following works fine Dim dtNow As DateTime = DateTime.Now Dim NYSEclose As DateTime Dim ...
Ernesto's user avatar
  • 35
2 votes
0 answers
208 views

What is the default `datetime.now()` timezone? [duplicate]

from datetime import datetime from datetime import timezone print(f'datetime.now(): {datetime.now()}') print(f'current timezone: {datetime.now().tzinfo}') # prints `None` As seen in the above code ...
FreelanceConsultant's user avatar
2 votes
3 answers
88 views

Selecting today's rows based on UTC time

I have a table with a field called recordTime of type timestamp without time zone. I want to select today's rows only (i.e. since midnight). The records are sourced globally and arrive as UTC, so I ...
ConanTheGerbil's user avatar
0 votes
3 answers
76 views

Shift in seconds from UTC to real clock time

While fetching data from a weather API the result time zone for Indian location was 19800, which was shift in seconds from UTC to real clock time. timezone : 19800 I need that to real clock time. ...
Tony's user avatar
  • 109
5 votes
1 answer
91 views

Why can't I get the Timestamp of the date '1914-11-08 00:00:00' in timezone 'Europe/Amsterdam'?

Recently i upgraded my mysql-connector from 5.1.47 to 8.0.33. After that, i met an error: Caused by: java.sql.SQLException: HOUR_OF_DAY: 0 -> 1 at com.mysql.cj.jdbc.exceptions.SQLError....
Lawrence's user avatar
  • 140
0 votes
0 answers
28 views

Python Daylight Savings Accomodation [duplicate]

Iam working on a django project. Im fairly new to it. I have a requirement to sent out email reports in which I need to convert datetimes into yours local timezone. Im saving records in utc time and I ...
Mr Joker's user avatar
1 vote
0 answers
30 views

How can the system time and computer time be different locally in .net core API?

I am running a .net core API project locally on my Windows machine, local time is utc +3. In the response header returned from the requests, the results are returned according to utc + 0. This time ...
deneme deneme's user avatar
0 votes
0 answers
28 views

C# - Deserialize DateTime & DateTimeOffset values to UTC and Local Time as required

I'm currently working on a full stack application that has never had to be conscious of time zone, but looks like it will soon need to be a bit more versatile in terms of being aware of local time ...
marcuthh's user avatar
  • 596
0 votes
0 answers
27 views

Use of Iana TZ files with Oracle

I am wondering if the TZ files from the website https://www.iana.org/time-zones are compatible with Oracle time zone files? Can they be used to update the TZ entries for an Oracle database? Currently ...
Michael Ault's user avatar
0 votes
0 answers
10 views

I can't change timezone using Date/MomentJS/MomentJS-TimeZone

import moment from "moment"; import momentTZ from "moment-timezone"; moment.locale("fr"); momentTZ.tz.setDefault("Europe/Paris"); console.log(moment(), moment(...
Rémi's user avatar
  • 1
0 votes
2 answers
49 views

pandas date column to unix timestamp accounting for timezone and varying datetime formats

I have multiple data frames with a datetime column as a string. Datetime formats vary across columns in the dataframe or across dataframes. I want to get a unix timestamp that gets interpreted by an ...
Ted M.'s user avatar
  • 370
0 votes
1 answer
100 views

convert UTC timezone into custom local time with daylight savings offset (and back) in google sheets

I'm looking for a way to convert standard UTC timestamps into a valid Date Time values of local timezone with daylight saving oscillation in mind. ...using this unnamed calendar app, that does not ...
player0's user avatar
1 vote
1 answer
55 views

Wrong Pandas timezone conversion using .tz_convert()

I'm using Pandas' Series.dt.tz_convert() method to do timezone conversion on a DataFrame Series: STANDARD_DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' df['timestamp'] = pd.to_datetime(df['timestamp'], format=...
Gabriel 's user avatar

1
2 3 4 5
250