Questions tagged [timezone-offset]
A time zone offset describes the difference between a "wall time" and UTC. General questions about time zones will get better visibility when tagged with 'timezone'.
1,007
questions
0
votes
0
answers
11
views
Data stored in UTC timezone in SQL Server
Is it possible to store date time fields in sql server in UTC format and still display them in the local time zone in your tables in SQL Server?
Our source has UTC data which we need to convert to ...
1
vote
2
answers
45
views
How to convert string like "yyyy-MM-ddThh:mm:ss+XXXX" to proper date_format in Spark?
I have a column containing string data like "2023-03-13T15:18:14+0700". My final goal is to convert it to a proper date format like "2023-03-13 15:18:14". It's best to convert the ...
0
votes
0
answers
24
views
How to convert a UTC Datetime stored in a column with a stored (time) offset value using MySQL?
I have a table called table1. In this table I have a time column called LOFFSET which saves the local timezone offset (-07:00:00).
I have another column called fpurchased that contains a datetime in ...
0
votes
1
answer
69
views
A surprising difference between pandas.Timestamp and Python datetime. (Should I submit a bug to pandas team ?)
here is the problem : pandas.Timestamp answer differ from Python datetime answer.
More precisely, given a "naive" date d, I build dt, an "aware" datetime (python) and ts, an "...
1
vote
0
answers
52
views
Standard ISO 8601 format of ±HH:MM for ZoneOffset in swagger instead of JSON
I'm currently working on Java application, which works with the orders. In some @RestController methods I return an instance of an Order class, which contains a timezone field.
@Data
@...
0
votes
0
answers
20
views
Timezone changes when converting time to string
I use InfluxDB as Datasource and Flux as query language.
In the time format the displayed value is e.g. 2023-02-10 16:47:33. When using toString() I get 2023-02-10T15:47:33.9000000000Z. So the value ...
16
votes
1
answer
501
views
Historic timezone offsets in newer JDK versions
I found a weird java discrepancy while testing some timezones with the use of ZonedDateTime. I was trying to parse a date before 1970 and saw that the result changes between java versions. The offset ...
3
votes
2
answers
85
views
Date conversion: add UTCOffset to existing timezone
I have date which is in the format of(example) Date = 2023-01-09T23:51:44.595Z
and I have utcOffset String utcOffset = "UTC +6"
I want output as 2023-01-10T05:51:44.595Z in Date format.
How ...
2
votes
2
answers
60
views
ZoneOffset ZoneId custom serialization
What is the best way to serialize ZoneId or ZoneOffset from format +03:00 to format +03.00 using Jackson? Or may be there is another way how to change : to .
0
votes
1
answer
50
views
TZ=UTC+03:00 vs TZ=UTC+3 difference for Nodejs
Can someone explain to me, why TZ=UTC+03:00 gives timezone offset -180, and TZ=UTC+3 — 180?
$ TZ=UTC+03:00 node -e 'console.log((new Date).getTimezoneOffset())'
-180
$ TZ=UTC+3 node -e 'console.log((...
0
votes
2
answers
64
views
How to get human friendly format time zone offset (PHP)
Help me to decide this task, please. (PHP, Symfony)
What I have:
List of time zone like
"Europe/Riga"
"Europe/Rome"
"Europe/Samara"
"Europe/San_Marino"
"...
0
votes
1
answer
122
views
How to perform date operations in bash
Basically, I want to take a time, and day of the week, in UTC+8, and adjust the datetime object to a given UTC offset, within bash, I don't have any code to show because I'm not sure how to start ...
0
votes
1
answer
96
views
Convert UTC RFC3339 Timestamp to Local Time with the time crate
I've been banging my head against the time crate for the last two days. I can't find, where in their documentation how to take a RFC3339 UTC 2022-12-28T02:11:46Z timestamp and convert that to local ...
0
votes
0
answers
30
views
Parse Unix timestamp with offset in php example timestamp 1671847200000-0600
I am trying to parse the Unix timestamp in Laravel
/Date(1671847200000-0600)/
where 1671847200000 is the timestamp and this is -0600 offset (-06:00 i.e. -HH::mm)
expected output be like
2022-12-23 18:...
0
votes
3
answers
723
views
How to change timezone of date android kotlin [HH:mm]
As input, I get a string like HH:mm, which is UTC. But I need to convert the time to +3 hours (i.e. UTC +3).
For example, it was 12:30 - it became 15:30.
I tried this code, but its not working :(
fun ...
0
votes
1
answer
11
views
Construct date at same time from existing datetime-local string
I have an HTML page with an <input type="datetime-local"> on it. This input has a value.
I want to construct a new date/time string, that is compatible with datetime-local format, ...
0
votes
1
answer
78
views
Timezone offset in datetime format with read_csv in R
I have a long csv file with multiple columns. The first column is datetime with a timezone offset:
2015-05-29 02:05:00+02:00
I am trying to read it with read_csv in R and I would like it to be ...
0
votes
0
answers
45
views
EST to EDT hours comparison in Python
I am trying to create some simple code that given a datetime, it would tell me if I would miss the train or not, based on the time (hour/minute) of a train timetable stored in the EDT time.
For ...
0
votes
0
answers
86
views
Get List of Timezones with GMT offset
Can someone help me in getting a list of timezones with GMT/UTC (I believe these are the same) offset like
(GMT+5:30) Asia/Kolkata.
Thank You
-1
votes
2
answers
85
views
Python: Incorrect UTC Offset
The following code prints: -1 day, 19:00:00 when New York is actually 5 hours behind UTC. What is wrong and how to fix it?
import pytz
from datetime import datetime
date = datetime(2022, 11, 23, 22, ...
0
votes
1
answer
390
views
How to convert a date with time zone offset to another format
I tried reading a lot about the date formatting with time zone, but it doesn't make sense to me.
My DB shows this datetime: 2022-12-01 04:00:00.000 +08:00
My UI shows it as: Thu 01/12/2022 12:00
I ...
0
votes
0
answers
35
views
How to make a naive datetime an aware datetime using pandas to_datetime() method
I have tried to make a datetime object selected from my dataframe (with a time column: (Time_utc) in Unix time), an aware datetime using to_datetime() method in pandas, but I don't seem to know how. I ...
0
votes
1
answer
99
views
date incorrect in angular material datepicker-day before date
hello I have problem when i select a date I see the correct date in the field but when I save it the datepicker send the day before the date. i use datetime picker range
html code:
<mat-form-...
0
votes
0
answers
83
views
Google Calendar API - determine how much free time a person has between a start time and end time in Javascript
I'm trying to build a dashboard indicating how much free time a set of employees has based on their calendar so we know who has time to work on different projects. I'm using the Google Calendar APIs ...
0
votes
1
answer
123
views
Timezone Independent countdown React/JS
I'm trying to create a timer with a GMT end date and a timezone independent start date so any user can follow the countdown accurately.
const currentDate = new Date();
const gmt = new Date(
...
3
votes
4
answers
543
views
How can I get the UTC offset from a timezone
In Node, how can I convert a time zone (e.g. Europe/Stockholm) to a UTC offset (e.g. +1 or +2), given a specific point in time? Temporal seems to be solving this in the future, but until then? Is this ...
2
votes
2
answers
558
views
Polars add/substract utc offset from datetime object
I wanted to add/subtract the UTC offset (usually in hours) to/from the datetime object in polars but I don't seem to see a way to do this. the UTC offset can be dynamic given there's Day Light Saving ...
0
votes
0
answers
64
views
How do I fix "TypeError: can't compare offset-naive and offset-aware datetimes"?
I'm using the code linked below to convert ICS files to csv, and one particular calendar gives me
"Traceback (most recent call last):
File "ical2csv.py", line 126, in
sortedevents = ...
1
vote
1
answer
144
views
Remove timezone in SQL Server query while keeping the precision
I am running the following query on SQL Server 2019:
SELECT
autoid,
ReceivedUTC,
ReceivedUTC AT TIME ZONE 'UTC' AT TIME ZONE 'Central Europe Standard Time' AS ReceivedTST
FROM
"...
0
votes
0
answers
150
views
is this a valid java date string "2022-08-22T10:18:00.000 10:00"? date format can not parse this string
I can parse the ff. date string with the format below.
"2022-08-20T00:03:00.000+10:00" -> "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
"2022-08-20T00:03:00.000 +10:00" -> "...
1
vote
1
answer
82
views
How to test use of toLocal in Dart
I would like to write a testcase to ensure use of the toLocal function in a Flutter app I am working on as forgetting that has been a reoccuring issue. Note: I am not asking how to test the function, ...
2
votes
1
answer
767
views
How to avoid/control a timezone offset when deploying next.js app to vercel?
In a React/Next.js App, is there a way to always make sure, anywhere in the world it shows the local time in CEST. Let’s say; I get the GMT time from my backend, which I want to offset, to display the ...
0
votes
0
answers
53
views
Quartz.NET and Daylight Savings Time
I need help understanding how daylight savings time and daily standard time will affect our jobs.
The docs say that CRON schedules will run at the same time of day regardless of daylight savings time. ...
1
vote
0
answers
244
views
Random UTC time zone with offset in Faker
I can get random time zones with Faker https://fakerjs.dev/api/address.html#timezone
But I wish to get output with offset like:
(UTC-05:00) Haiti
Is possible to get those data with Faker? If not what ...
0
votes
1
answer
27
views
How to pass TimeZone Name from Angular to .NET API?
I have an API that accepts the TimeZone name (America/Denver) as a string. In the Angular UI application, I am passing the TimeZone name by detecting the browser timeZoneName. But when the API ...
2
votes
0
answers
23
views
how to check timestamp of the high value for the table partitions in oracle sql
the high value for one of my table partition in oracle sql is TIMESTAMP' 2022-09-06 00:00:00'. My understanding is that it does not represent any timezone. Is there a way for me to check what timezone ...
0
votes
2
answers
67
views
I don't understand how to get Time zone Offset to hide field during closing hours using JavaScript
I am trying to hide a certain field on my website between the hours of 6 pm and 7 am and I was able to find a javascript that could solve that issue for me but the javascript came with ...
0
votes
1
answer
237
views
Wrong offset GMT Standard Time on Windows 10: +00:00 instead of +01:00
I receive a strange result when I try to find a time zone for "GMT Standard Time":
It returns UTC +00:00 when I expect to receive +01:00.
The next weird thing is when I convert UTC time to &...
0
votes
1
answer
42
views
Different Javascript Date() overloads arbitrarily using different time zones (standard vs. daylight)
Same behavior on Chrome and Firefox running on Windows 10:
> new Date(1420088400000)
< Thu Jan 01 2015 00:00:00 GMT-0500 (Eastern Standard Time)
> new Date()
< Mon Aug 01 2022 21:27:35 ...
0
votes
1
answer
157
views
how to deal with time zone when it comes to using neural prophet?
I have data with a timestep of 1 min for almost a year and a half. I removed the timezone from the timestamp, now the format looks like this: "yyyy-MM-dd HH:mm:ss". Then I renamed the time ...
0
votes
2
answers
174
views
How to get time zone from offset
I am getting offset time like 180000 from API, but what I need is time zone like newYork/America ,how can I get time zone from offset , is there any method. Any help would be appreciated. I am ...
1
vote
2
answers
367
views
How to show same date for all time zone in javascript
We have a lot of data where dates are saved with the time component and these dates are saved from different time zones. For example, if we save "1st July 2022" in IST, in the database it is ...
0
votes
1
answer
87
views
How do i convert a time in EST to Dubai timezone using UTC as my basetime
I want to convert a time(10AM) which is in EST to Asia(Dubai) timezone using UTC as my base time. I am to first convert the time (10AM) to UTC and then to Asia(Dubai) time.
0
votes
1
answer
339
views
Python strftime with timezone offset
is it possible to format datetime object with strftime with timezone offset?
I do have unix timestamp let say 1658123953 converted to python timezone aware datetime object
datetime.datetime(2022, 7, ...
0
votes
0
answers
61
views
Offset not calculated correctly at OffsetDateTime to Instant conversion in Java 8 [duplicate]
I would need the community's help because I could not find the answer in the Java documentation. I don't understand how the offset is taken into the math calculations when I try to convert an ...
0
votes
2
answers
330
views
Python - How to convert datetime object to timezone given as string in a column?
I have a column of UTC times which I need to convert to 'local' times based on the UTC timezone provided in a second column as a string. How do I assign a timezone using pytz to the time in the column ...
-1
votes
1
answer
142
views
Setting UTC timezone with numeric values in JS [UTC+2, UTC+3, UTC-12, etc]
How can I create a date with a specific timezone like that [UTC+2, UTC+3, UTC-12, etc] but not with string like that 'America/New York' in js/moment.js? I have a list of all timezones from server in ...
0
votes
1
answer
26
views
Rails how to schedule a rake email task from Development environment through Mailer for different timezones
I need to add a new email that can be sent to each user in the morning.
We have a multi-tenant per client system, and each client has multiple users with their respective timezones.
I have created a ...
0
votes
2
answers
68
views
If a computer changes geographic location, will the system clock still return the UTC accurately?
Suppose someone travels from a country with UTC to +/- X hr timezone. Their device such as a computer or a mobile, is completely switched off during this journey.
Upon reaching the destination, once ...
0
votes
1
answer
58
views
why pd.read_sql_query is not fetching the time zone info from the DB
I am trying to fetch data from various columns of different datetime datatypes (with and without timezone details) from Oracle DB into pandas DataFrame.
As you can see column c2 have timezone in it. ...