docs icon indicating copy to clipboard operation
docs copied to clipboard

Small issue or unclear part in TimeSpan example

Open TheRealMaxion opened this issue 5 years ago • 8 comments

In the second code snippet of the TimeSpan structure section, the example output says the store is closed at 21:00 when the store closing time is 21:30 and there is no indication of the local timezone being different from the store timezone.

Suggested solution is one or both of the following:

  • Print local timezone or offset in output to indicate whether it is different from the timezone or offset of the store
  • If the timezone is supposed to be the same in the example, change the "Store is open at 21:00:00: False" line to True because the store closing time is defined as 21:30

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

TheRealMaxion avatar Jan 03 '20 11:01 TheRealMaxion

I suppose this should have been in the samples repository.

TheRealMaxion avatar Jan 07 '20 09:01 TheRealMaxion

@TheRealMaxion No, this is the correct place. The snippet code may live in that repo but the issue is related to the published article.

Thraka avatar Jan 07 '20 17:01 Thraka

Thank you for opening this issue. I think the code should be updated to indicate the timezones and then also indicate on the output of the is open check, that this is based on your timezone.

Console.WriteLine($"Store is in timezone {store103.tz} and you are in timezone {TimeZoneInfo.Local}");
Console.WriteLine($"Store is open in your timezone at {time}: {store103.IsOpenAt(time)}");

Thraka avatar Jan 07 '20 18:01 Thraka

This issue has been closed as part of the issue backlog grooming process outlined in #22351.

That automated process may have closed some issues that should be addressed. If you think this is one of them, reopen it with a comment explaining why. Tag the @dotnet/docs team for visibility.

dotnet-bot avatar Jan 25 '21 15:01 dotnet-bot

This is still an issue, though the other lines in the example for what other times the store are closed imply that the user doing the checking is located in the PST timezone, there is no explicit information or definition of this given, and therefore the output of the example looks wrong.

TheRealMaxion avatar Jan 26 '21 18:01 TheRealMaxion

Also it seems that I do not have access to reopen the issue. @Thraka can you do it?

TheRealMaxion avatar Jan 26 '21 18:01 TheRealMaxion

Thanks @TheRealMaxion I'll reopen.

BillWagner avatar Jan 26 '21 18:01 BillWagner

Thank you @BillWagner

TheRealMaxion avatar Jan 26 '21 18:01 TheRealMaxion