René's URL Explorer Experiment


Title: SetAndReadDateTimeLocal_DateRange test fails due to DST changes in America/Sao_Paulo timezone · Issue #82 · JavascriptNet/Javascript.Net · GitHub

Open Graph Title: SetAndReadDateTimeLocal_DateRange test fails due to DST changes in America/Sao_Paulo timezone · Issue #82 · JavascriptNet/Javascript.Net

X Title: SetAndReadDateTimeLocal_DateRange test fails due to DST changes in America/Sao_Paulo timezone · Issue #82 · JavascriptNet/Javascript.Net

Description: Below is what happens on my PT-BR system. Compiled against v8-v142 (7.5.288.23), target net45. Since the test case runs through the all dates at 0:00, it receives back 1:00 AM when it hits DST shift time in Brazil (and other local time a...

Open Graph Description: Below is what happens on my PT-BR system. Compiled against v8-v142 (7.5.288.23), target net45. Since the test case runs through the all dates at 0:00, it receives back 1:00 AM when it hits DST shif...

X Description: Below is what happens on my PT-BR system. Compiled against v8-v142 (7.5.288.23), target net45. Since the test case runs through the all dates at 0:00, it receives back 1:00 AM when it hits DST shif...

Opengraph URL: https://github.com/JavascriptNet/Javascript.Net/issues/82

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SetAndReadDateTimeLocal_DateRange test fails due to DST changes in America/Sao_Paulo timezone","articleBody":"Below is what happens on my PT-BR system. Compiled against v8-v142 (7.5.288.23), target net45. \r\n\r\nSince the test case runs through the all dates at 0:00, it receives back 1:00 AM when it hits\r\nDST shift time in Brazil (and other local time adjustments like the one in 1914).  This is the expected behavior for V8, since such combinations of date/time does not exist in America/Sao_Paulo timezone.\r\n\r\n```\r\nMessage: \r\n    Assert.Fail failed. Expected 01/01/1914 00:00:00, but got 01/01/1914 00:06:28\r\n    Expected 03/10/1932 00:00:00, but got 03/10/1932 01:00:00\r\n    Expected 01/12/1949 00:00:00, but got 01/12/1949 01:00:00\r\n    Expected 01/12/1950 00:00:00, but got 01/12/1950 01:00:00\r\n    Expected 01/12/1951 00:00:00, but got 01/12/1951 01:00:00\r\n    ....\r\n    Expected 16/10/2016 00:00:00, but got 16/10/2016 01:00:00\r\n    Expected 15/10/2017 00:00:00, but got 15/10/2017 01:00:00\r\n    Expected 04/11/2018 00:00:00, but got 04/11/2018 01:00:00\r\n    Expected 03/11/2019 00:00:00, but got 03/11/2019 01:00:00\r\n    ....\r\n    Expected 03/11/2097 00:00:00, but got 03/11/2097 01:00:00\r\n    Expected 02/11/2098 00:00:00, but got 02/11/2098 01:00:00\r\n    Expected 01/11/2099 00:00:00, but got 01/11/2099 01:00:00\r\n```\r\n\r\nI added val.toString() and val.getTime() to the test output, so I could verify that V8 Date objects are correct. Here is what I got back:\r\n\r\n```\r\n....\r\n    Expected 16/10/2016 00:00:00, but got 16/10/2016 01:00:00 \r\n    str: Sun Oct 16 2016 01:00:00 GMT-0200 (Horário de Verão de Brasília), \r\n    timestamp: 1476586800000\r\n\r\n    Expected 15/10/2017 00:00:00, but got 15/10/2017 01:00:00 \r\n    str: Sun Oct 15 2017 01:00:00 GMT-0200 (Horário de Verão de Brasília), \r\n    timestamp: 1508036400000\r\n....\r\n```\r\n\r\nIt is exactly the same behavior as I get in chrome console for that dates:\r\n\r\n```\r\n\u003enew Date(2016,9,16)\r\n\u003cSun Oct 16 2016 01:00:00 GMT-0200 (Horário de Verão de Brasília)\r\n\u003e1476586800000\r\n```\r\n\r\nSo the problem is with the test itself, as long as you are only dealing with local (timezone-unaware) DateTime objects. However, it will be a different story for timezone-aware DateTime objects (those with timezone information).\r\n\r\nIn order to have stable behavior across different locales, I recommend to avoid component-based Date conversion. Instead, it would be better to always have any .NET DateTime object first converted to UTC timestmp (locaized or not), an then use this timestamp to construct V8 Date constructor (it could be int64 value or ISOString). \r\n","author":{"url":"https://github.com/m0nzderr","@type":"Person","name":"m0nzderr"},"datePublished":"2019-09-24T20:30:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/82/Javascript.Net/issues/82"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:477e28f4-0b08-a43a-57dc-09bbdfcbb049
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id91C8:3106E:640CAE8:8167395:69766F11
html-safe-noncec9088a6bee5ca6685f2cf7aeb6acdde4de97532df638f2e979663da3284b17b6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUM4OjMxMDZFOjY0MENBRTg6ODE2NzM5NTo2OTc2NkYxMSIsInZpc2l0b3JfaWQiOiI5MjA4NzQyMjg3ODM2NzMxMDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2b8b8cb471995e27e8fdc692a54aec5357d69bc7c169005e97ab2ed4acb79f9e
hovercard-subject-tagissue:497908274
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavascriptNet/Javascript.Net/82/issue_layout
twitter:imagehttps://opengraph.githubassets.com/36d995fa8b6d485a76ed10ae41f72d89cdf4eb0ed1a05103fbf9cc4badab7b40/JavascriptNet/Javascript.Net/issues/82
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/36d995fa8b6d485a76ed10ae41f72d89cdf4eb0ed1a05103fbf9cc4badab7b40/JavascriptNet/Javascript.Net/issues/82
og:image:altBelow is what happens on my PT-BR system. Compiled against v8-v142 (7.5.288.23), target net45. Since the test case runs through the all dates at 0:00, it receives back 1:00 AM when it hits DST shif...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamem0nzderr
hostnamegithub.com
expected-hostnamegithub.com
None032152924a283b83384255d9489e7b93b54ba01da8d380b05ecd3953b3212411
turbo-cache-controlno-preview
go-importgithub.com/JavascriptNet/Javascript.Net git https://github.com/JavascriptNet/Javascript.Net.git
octolytics-dimension-user_id7556289
octolytics-dimension-user_loginJavascriptNet
octolytics-dimension-repository_id9036853
octolytics-dimension-repository_nwoJavascriptNet/Javascript.Net
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9036853
octolytics-dimension-repository_network_root_nwoJavascriptNet/Javascript.Net
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5b577f6be6482e336e3c30e8daefa30144947b17
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/issues/82#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavascriptNet%2FJavascript.Net%2Fissues%2F82
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavascriptNet%2FJavascript.Net%2Fissues%2F82
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JavascriptNet%2FJavascript.Net
Reloadhttps://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/issues/82
Reloadhttps://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/issues/82
Reloadhttps://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/issues/82
JavascriptNet https://patch-diff.githubusercontent.com/JavascriptNet
Javascript.Nethttps://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FJavascriptNet%2FJavascript.Net
Fork 154 https://patch-diff.githubusercontent.com/login?return_to=%2FJavascriptNet%2FJavascript.Net
Star 833 https://patch-diff.githubusercontent.com/login?return_to=%2FJavascriptNet%2FJavascript.Net
Code https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net
Issues 14 https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/issues
Pull requests 0 https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/pulls
Actions https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/actions
Projects 0 https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/projects
Wiki https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/wiki
Security 0 https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/security
Insights https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/pulse
Code https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net
Issues https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/issues
Pull requests https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/pulls
Actions https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/actions
Projects https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/projects
Wiki https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/wiki
Security https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/security
Insights https://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/JavascriptNet/Javascript.Net/issues/82
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/JavascriptNet/Javascript.Net/issues/82
SetAndReadDateTimeLocal_DateRange test fails due to DST changes in America/Sao_Paulo timezonehttps://patch-diff.githubusercontent.com/JavascriptNet/Javascript.Net/issues/82#top
https://github.com/m0nzderr
https://github.com/m0nzderr
m0nzderrhttps://github.com/m0nzderr
on Sep 24, 2019https://github.com/JavascriptNet/Javascript.Net/issues/82#issue-497908274
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.