- ABP Framework version: v8.3 Hi, There a lot of customers who are using the product from the countries utilising DST (daylight saving time) and we don’t have an option to auto adjust timezone based on DST changes. Can we enhance the product to adjust timezone accommodating DST? Do you have any solution in that case?
11 Answer(s)
-
0
Hello
Can you please check this document https://abp.io/docs/9.0/framework/infrastructure/timing#time-zones
Thank you.
-
0
Hello,
I checked this document before generating a ticket. I found https://www.iana.org/time-zones in https://abp.io/docs/8.3/framework/infrastructure/timing#time-zones. In iana, they said: 'The Time Zone Database (often called tz or zoneinfo) contains code and data that represent the history of local time for many representative locations around the globe.'
In light of this information, can we say that the DST requirement has been met? According to the information we will receive from you, we will pass our custom and only UTC-supporting timezone structure in the product to abp's time zone parameter. Could you please confirm?
Thank you very much,
-
0
hi
You can set
Clock
toUTC,
after that all data time will beUTC,
then you can convert theUTC
time to the user's timezone.If the user doesn't set the time zone, you can get the current time zone from the browser.
Configure<AbpClockOptions>(options => { options.Kind = DateTimeKind.Utc; });
-
0
I couldn't understand what you were trying to say.
My question is: If your timezone capability supports DST, we will pass our custom and only UTC-supporting timezone structure in the product to abp's time zone parameter.
Does your timezone capability support DST feature? Could you please confirm?
-
0
hi
Does your timezone capability support DST feature? Could you please confirm?
ABP timezone is just a setting. The user or system can set it.
You have to add code to convert UTC to DST.
- All date time from the backend is
UTC
. - Get the user's current timezone.
- check if the timezone is DST.
- convert
UTC
time to user timezone and add or subtract a few hours based on DST info.
- All date time from the backend is
-
0
-
0
hi
I think they only are time offset with UTC.
eg:
UTC-5, UTC+3, UTC+8
-
0
When I saw the lists' country parameters, I thought it include the DST info. Could you please confirm your idea and be sure? If it includes DST parameters, we'll change, if not, we won't change. You can find DST parameters here: https://www.timeanddate.com/time/dst/2024.html
-
1
hi
The list are
key-value
of timezone. But you can getDST info
byTZConvert
https://github.com/mattjohnsonpint/TimeZoneConvertervar timeZoneInfo = TZConvert.GetTimeZoneInfo("Central Europe Standard Time");
Time Zone Name: (UTC+01:00) Central European Time (Budapest) Time Zone ID: Europe/Budapest Standard Time Offset: 01:00:00 ../// Effective Period: 2024/3/31 - 2024/10/27 Daylight Saving Offset: 01:00:00 Start: System.TimeZoneInfo+TransitionTime End: System.TimeZoneInfo+TransitionTime Effective Period: 2025/3/30 - 2025/10/26 Daylight Saving Offset: 01:00:00 Start: System.TimeZoneInfo+TransitionTime End: System.TimeZoneInfo+TransitionTime ..///
-
0
Thanks, we'll evaluate this solution.
-
0
: )