Skip to content

Add U.S. Pacific Standard Time zone context to second DateTime conversion example#51945

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-typo-in-example
Open

Add U.S. Pacific Standard Time zone context to second DateTime conversion example#51945
Copilot wants to merge 2 commits intomainfrom
copilot/fix-typo-in-example

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

The second code example in "Conversions from DateTime to DateTimeOffset" used DateTimeKind.Local without indicating which local time zone the output reflects, making the example harder to interpret. The third example already included this context.

Change

Added a timezone note to the introductory sentence of the second example to match the pattern established by the third:

"…the following code converts a local time to its equivalent DateTimeOffset value. The conversion is run in the U.S. Pacific Standard Time zone:"

Original prompt

This section details on the original issue you should resolve

<issue_title>More context for the second example on the page</issue_title>
<issue_description>### Type of issue

Typo

Description

In the second example DateTime.King Local is used, but there is no mention of what the local timezone is. But in the Third exemaple there is emntion of this. It would be clearer to also mention the current timezon with the second example.

I mean this senence that is present with the third example should also be mentioned with the second example:

The conversion is shown in the following example, which is run in the U.S. Pacific Standard Time zone:

Page URL

https://learn.microsoft.com/en-us/dotnet/standard/datetime/converting-between-datetime-and-offset

Content source URL

https://github.com/dotnet/docs/blob/main/docs/standard/datetime/converting-between-datetime-and-offset.md

Document Version Independent Id

109db4d3-f55a-29f3-8423-f787af34f5b9

Platform Id

549c9225-57f5-2136-6e61-ed2740b252b8

Article author

@adegeo

Metadata

  • ID: bba03d8b-25fc-506f-6931-dddab382c3ef
  • PlatformId: 549c9225-57f5-2136-6e61-ed2740b252b8
  • Service: dotnet-fundamentals

Related Issues</issue_description>

<agent_instructions>In the 'Conversions from DateTime to DateTimeOffset' section, add U.S. Pacific Standard Time zone to the description of the 2nd code example, just like the 3rd has.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Internal previews

📄 File 🔗 Preview link
docs/standard/datetime/converting-between-datetime-and-offset.md docs/standard/datetime/converting-between-datetime-and-offset

…n example

Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix typo and improve clarity for DateTime example Add U.S. Pacific Standard Time zone context to second DateTime conversion example Feb 27, 2026
@adegeo adegeo marked this pull request as ready for review February 27, 2026 17:51
@adegeo adegeo self-requested a review as a code owner February 27, 2026 17:51
Copilot AI review requested due to automatic review settings February 27, 2026 17:51
@adegeo adegeo requested a review from a team as a code owner February 27, 2026 17:51
@adegeo adegeo requested a review from BillWagner February 27, 2026 17:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds timezone context to the second code example in the "Conversions from DateTime to DateTimeOffset" section. The issue reporter correctly noted that the second example used DateTimeKind.Local without specifying which timezone, while the third example already included this information.

Changes:

  • Added "The conversion is run in the U.S. Pacific Standard Time zone:" to the introductory sentence for the second code example to clarify the local timezone context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More context for the second example on the page

4 participants