System.TimeZoneInfo has a method called IsDaylightSavingTime, which takes a DateTime object and returns true if the specified datetime falls in the DST for that timezone. Is there an equivalent function in NodaTime or another way to achieve the same result?
相关问题
- Display time in local timezone when querying Influ
- lon,lat to timezone
- convert string to DateTime in C# with EDT at the e
- VBA local timezone adjustment
- Jackson to deserialize Joda LocalDate from ISO Dat
相关文章
- How to truncate seconds in TSQL?
- How to remove seconds from datetime?
- OLS with pandas: datetime index as predictor
- Calculate number of working days in a month [dupli
- How can I convert a OLE Automation Date value to a
- Out of bounds nanosecond timestamp
- How to serialize Xml Date only from DateTime in C#
- Set Date/Time to 00:00:00
You can get this from a
ZoneInterval
. Here is an extension method that will help.Now you can do:
If you don't have a
ZonedDateTime
, you can get one from aDateTimeZone
plus either anInstant
or aLocalDateTime
. Or you can massage this extension method to take those as parameters.Update: This function is now included in Noda Time v1.3 and higher, so you no longer have to write the extension method yourself.