Skip to content

How to show date/time in client time zone, not server #2024

@Rick-Anderson

Description

@Rick-Anderson

There is no word on how to get client's local date/time to the server. Its not clear if Asp.Net Core helps with that in any way like it helps with client's culture capturing. At least you should have noted that model bindings use server's time zone when parsing date/time values with no offset specified. The same is regarding formatting date/time values for response: while client's culture is automatically used, the time zone offset is taken from the server system.

Image I want the F1 schedule but displayed in clients time zone.

  • Save client time zone (TZ) in users profile and add to session
  • Apply TZ offset in time responses

customer asked this question in Globalization and localization but that's probably not the best place to provide guidance.

cc @danroth27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions