-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support timezones without daylight savings time (Case 943047) #801
Conversation
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// Michael DeRoy | ||
// Jonathan Chambers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want emails
string[] names; | ||
if (!System.CurrentSystemTimeZone.GetTimeZoneData (1973, out data, out names)) | ||
string[] names; | ||
int currentYear = DateTime.UtcNow.Year; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No chance of infinite recursion here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, looks like DateTime.UtcNow calls into an icall to get the current system time..converts that to ticks and passes it into the DateTime() constructor...should be no chance of recursion, and I'm not seeing it myself.
DateTime dltStartTime = new DateTime(1, 1, 1).Add(dlt.Start.TimeOfDay); | ||
DateTime dltEndTime = new DateTime(1, 1, 1).Add(dlt.End.TimeOfDay); | ||
TimeSpan utcOffsetTS = TimeSpan.FromTicks(data[(int)TimeZoneData.UtcOffsetIdx]); | ||
char utcOffsetSign = (utcOffsetTS >= TimeSpan.Zero) ? '+' : '-'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var
please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok ;(
eda4275
to
5b817a3
Compare
5b817a3
to
eee354c
Compare
Release Notes: Fixes an issue where certain platforms failed to do time conversions to a user's local timezone