- 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.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
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,
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
hi
You can set
ClocktoUTC,after that all data time will beUTC,then you can convert theUTCtime 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; });Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
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?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
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
UTCtime to user timezone and add or subtract a few hours based on DST info.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - All date time from the backend is
-
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
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
1
hi
The list are
key-valueof timezone. But you can getDST infobyTZConverthttps://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 ..///Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
