1,349 questions
1
vote
0
answers
51
views
Why does Pandas .floor() throw AmbiguousTimeError for this Timestamp that's already unambiguous?
The following fails:
def round_in_tz(epoch_sec: int, tz_name: str, freq_spec: str):
"""Round the given epoch timestamp to the nearest pandas time frequency spec in the given timezone.&...
-1
votes
0
answers
19
views
Timezone not working for Daylight Saving Time
I have an application that will trigger an email. The current ICS file is below:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//My service name//EN
BEGIN:VEVENT
DTSTAMP:20241111T123323Z
X-...
0
votes
3
answers
57
views
Arduino Code to determine if we are in DST or not
I am writing C code for an ESP32C3, so an Arduino type piece of hardware. There is no internal clock, so to get the time I talking to an NTP server on the internet.
I am also talking to a weather ...
0
votes
1
answer
34
views
How do I change the time zone in Anylogic?
How can I disable Daylight Saving Time ?
In my model, the DST is automatic but I don't want it. I figured how to bypass it for the events (using toTimeoutInCalendar( DAY, 1 )) but I have a couple of ...
0
votes
0
answers
24
views
Unit testing GeventScheduler cron Job for DST
I have a bug in my system where the following cron job misses an hour run during DST finish or end, using GeventScheduler from apscheduler.schedulers.gevent
scheduler = GeventScheduler(
...
2
votes
1
answer
88
views
error while converting zoned time into get_local_time using Howard Hinnant's date library
#include "date/tz.h"
#include "date/date.h"
#include <iostream>
#include <string>
int main()
{
using namespace date;
using namespace std;
using namespace chrono;
auto ...
1
vote
0
answers
26
views
Is there a way to represent time deltas in Python that differentiates between "1 day" and "24 hours"? [duplicate]
I'm currently working on a reminder bot project that supports recurring reminders. For example, a user can specify that they want their reminder to repeat in intervals of "3 days", "12 ...
4
votes
1
answer
202
views
Why does golang time.AddDate result in inconsistent timestamps during DST transition in America/Santiago?
I'm trying to understand why time.AddDate in Go produces unexpected results during the Daylight Saving Time (DST) transition for the America/Santiago time zone in 2024.
Santiago enter DST at 2024-09-...
0
votes
0
answers
88
views
Converting a potential DST datetime to "normal" time when DST ends
I'm implementing conversion functions to and from DST datetimes. I have knowledge of when DST starts and ends. Going from "normal" time to DST is easy enough. Just add an hour to the normal ...
0
votes
1
answer
91
views
Hot update timezone data (tzdb) in Java without upgrading or restarting JVM
I'm working on a new feature on my app that require updated timezone information (including daylight saving).
I understand that the time zone information data (tzdb) is stored inside the JVM. So I ...
0
votes
0
answers
56
views
How to deal with datetime stored in local time?
I am working with a dataset where timestamps are stored in a CSV file in local time. Let's attempt to generate such timestamps:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
...
0
votes
1
answer
45
views
Determine Daylight savings time for US Cities prior to 1967
I'm working on a problem where I need to get date times and get their UTC offset.
The data that I get is a date a time and longitude and latitude.
I am currently using pytz and timezonefinder to find ...
0
votes
1
answer
68
views
DateTimeOffset Ticks is bugged or not? [closed]
I used a sorted list like that: SortedList<DateTimeOffset, Something>.
The data is well sorted according to the UTC date-time, which is expected.
But "Ticks" is bigger (for DST - for ...
0
votes
0
answers
127
views
Snowflake: how to convert wall clock time to UTC at fall daylight savings?
I have hourly data recorded in wall clock time in Chicago where 1am appears twice on the day when fall daylight savings occurs (which is expected - during fall daylight savings, a wall clock should ...
0
votes
2
answers
86
views
How Can I Make My Calendar Ignore DST Adjustments?
I’m trying to calculate the time by adding minutes to given date-time. It’s works well with other times but not for the DST times [ Canada Eastern time ].
public static GregorianCalendar addMinuts(...
1
vote
1
answer
83
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 ...
5
votes
1
answer
120
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....
0
votes
0
answers
35
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 ...
2
votes
1
answer
57
views
How to get the epoch value for any given Local Time with Time Zone & Daylight Saving Time in Python?
I'm new to Python and I have a use case which deals with datetime. Unfortunately, the data is not in UTC, so I have to rely on Local Time, Time Zones & Daylight Savings. I tried with datetime &...
0
votes
0
answers
42
views
Chrome < 88 has issues recognizing DST with Day.js
My company is thinking about introducing day.js to handle DST. This works well on modern browsers, but on browsers older than Chrome 88 it will not work. I have this little app to test Day.js:
import {...
0
votes
1
answer
27
views
Ruby Rails Calendar DST Issue
I am having an issue with Rails code displaying calendar entries off an hour when viewing. The data is correct in the database so I'm sure I'm missing something for the code. I have tried numerous ...
0
votes
0
answers
41
views
After day light saving time switch - Apache FTP library "listFiles()" function returns null members even though files exist
In our team, we use the Apache FTPClient library to get files from a directory on some FTP server.
To be specific - we import into our project "org.apache.commons.net.ftp.*;
With the help of that ...
0
votes
2
answers
64
views
Date timezone changes when manipulating date, making date math incorrect
When I create a new date, when I try modifying it to e.g. get a date 30 days ago, the timezone the date is represented in changes when I print it out, and the math ends up incorrect because of it.
In ...
-1
votes
1
answer
53
views
Is there a way to get daylight savings time info for non local timezones [duplicate]
I would like to find the equivalent daylight savings time zone for a given standard time zone. Here's a code snippet:
protected DateTime ConvertTimeZoneFromUTC(DateTime dateTime) {
//dateTime is ...
0
votes
1
answer
224
views
Egypt time zone java and joda libraries updated before DST 2023 does that need an update for 2024 DST
We are having a system running on servers having EET time zone, In 2023 before DST changes in Egypt, Java (jre8) and Joda(2.12.5) libraries were updated and it worked fine with EEST time zone. this ...
3
votes
1
answer
123
views
Why are these two datetimes not equal?
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
chi = ZoneInfo("America/Chicago")
nyc = ZoneInfo("America/New_York")
dt1 = datetime(2024, 3, 10, 3, 30, ...
1
vote
1
answer
64
views
Handling Local Time in Python Worldwide
I am working on an application in which events occur at specific times. The event creator can create events in a time zone where daylight saving time might or might not be applicable. Therefore, the ...
0
votes
1
answer
105
views
Get time difference in milliseconds between JVM and UTC
I am having an exceedingly hard time trying to figure out what seems to be a simple problem.
I would like to calculate the difference (offset?) in milliseconds between the UTC instant and the JVM ...
3
votes
2
answers
354
views
python: Incorrect(?) time difference between `datetime` objects spanning a daylight saving time change
(edited to add)
PROLOG: Today I became aware of the concept of "wall time". I will always and forever consider it harmful.
I have two datetimes, one representing a certain time-of-day just ...
2
votes
1
answer
111
views
Converting date+time in Character format to CET while correctly taking into account daylight savings
I have a small problem converting some characters (the format is CET, they are just stored as characters). I want to change the format from characters to date, such that I can convert between ...
0
votes
1
answer
80
views
creating datetime from date string plus hour offset not working across DST boundary
I'm in the early stages of learning Python, and I'm struggling to get DST time changes handled properly. I have CSV data that has a date column and an hour column and I am trying to create a timezone-...
0
votes
0
answers
89
views
How to get notified when DST change happens on android?
Is there a way to detect DST changes happening?
I tried using a broadcast receiver by TIMEZONE_CHANGED and TIME_SET, but none of them was triggered when the Android system changed DST.
The backup ...
0
votes
0
answers
51
views
How to handle Daylight saving time in laravel/php? [duplicate]
In the following code, i update or create a post based on the values that i receive from an api,
$this->channel->posts()->updateOrCreate([
'...
3
votes
1
answer
171
views
Adding Durations to dates in a manner stable across timezones
I'm currently working with software that does computations with date-fns Durations both on the server- and client-side.
This software gathers data for a time window that is specified using Durations ...
2
votes
1
answer
521
views
TimeZone Offset is incorrect for "Egypt Standard Time" on Windows 10
I am trying to convert an UTC date to "Egypt Standard Time", but calculated offset for summer time is different depending on the operating system version:
on windows 10, the offset is +2
on ...
2
votes
0
answers
41
views
Android - Alarm Manager and DST changes
I use an alarm manager to create repeating alarms (at a specific time) and exact alarms (at a time that changes from day to day).
The problem occurs when there's a DST start or finish:
For my ...
0
votes
0
answers
48
views
Timezone conversion failed due to winter hour change pytz
in my code I am trying to convert a date with pytz timezone, but due to the change to winter hour at 3 am, my code crash. I have two questions : one, why does changing hours makes the timezone ...
1
vote
1
answer
153
views
How to find DST Cutover time
Is there any easy way to find DST cutover time for particular Timezone(Say America/New_York) in given Time range?
I know I can write the custom logic to iterate over each hours, calculate the offset ...
1
vote
1
answer
113
views
How to check if a datetime value is valid (and not in time gap caused by DST change)?
Daylight Saving Time (DST) changes occur usually twice a year. During fall clocks are moved backwards which creates a fold which means that a given local time has two possible meanings. This is ...
1
vote
1
answer
90
views
What could cause an incorrect UTC offset when parsing last year ISO string date?
I can't figure why it fails under certain environments.
I have an ASP.NET Web API (.NET Framework 4.8)running under Windows 11 and a SPA as the client. The SPA has a date-picker for filtering some ...
0
votes
1
answer
74
views
How can I correct a dataframe with a datetime column so that the timezones are correctly added including DST changes? (Python)
The dataframe I have has a column without timezones. But due to DST changes I had some problems datamanipulation. These problems resulted from having 'missing' rows when the clock got changed foreward ...
1
vote
2
answers
116
views
Python datetime DST when tzinfo is None
Calling the method timestamp at the last Sunday of march returns:
>>> from datetime import datetime
>>> before = datetime.fromisoformat("2023-03-26 02:00:01")
>>> ...
0
votes
1
answer
221
views
Converting from local time to UTC in pandas
I am working with pandas dataframes containing local (Chilean) dates and times, e.g.:
local_time
2/9/2023 23:33
2/9/2023 23:39
3/9/2023 1:00
3/9/2023 1:08
I used to convert these dates and times ...
0
votes
1
answer
65
views
Convert Timestamp (%d/%m/%Y %H:%M) into and index not possible due to Daylight Savings on pandas (Python 3)
I am trying to read the information in a CSV file using pandas, the CSV has two columns, a timestamp (example: 31/12/2022 21:30) and a float value. This file is generate by an intrument that measures ...
3
votes
1
answer
1k
views
Python pytz, zoneinfo and daylight savings time
I am currently attempting to migrate a code base from using pytz to using Python's zoneinfo library. I've run into an issue with how zoneinfo handles daylight saving time transitions when compared to ...
0
votes
1
answer
485
views
How to Handle Timezones and Daylight Saving Time in MongoDB Application
I'm currently working on a project where I save Datetime in a MongoDB. However, I'm facing some challenges when it comes to dealing with timezones and daylight saving time for users from different ...
-2
votes
1
answer
249
views
java.time not accounting for daylightsaving DST [closed]
I want to convert a not timezone and DST aware time to a timezone aware time, so I can convert it to UTC.
java.time atZone does not include DST, so time is one hour off.
time offset should be +2 hours ...
0
votes
2
answers
140
views
DST-agnostic time in Python
I have a scheduling class that takes a datetime.time object and runs a task every day at the specified time.
import time
import datetime as dt
class Scheduler:
def set_time(self, day_time):
...
0
votes
0
answers
218
views
Teradata set time zone and DST for session
Due to certain reasons, I need to change the time zone on the session level in Teradata.
To achieve this, I can use the following command:
SET TIME Zone 'America Argentina'
However, even though there ...
0
votes
0
answers
189
views
PYTZ python is incorrectly adjusting for daylight saving on timezone Mexico_City
is PYTZ **incorrectly ** observing daylight saving for timezone Mexico_City ?
I think daylight saving is no longer observed in Mexico asper this article:
https://time.is/time_zone_news/...