Forum Discussion

Praveen1120's avatar
Praveen1120
Copper Contributor
Mar 14, 2024

DateTime - Culture Info Issue

Hi everyone,

I'm developing an HR application using Angular 13 and a .Net 6 Web API. I'm facing a challenge related to handling different time zones for users.

The Scenario:

The application is deployed in the AWS Asia/Mumbai region. When users from various time zones access the app, a culture information issue arises. Let's consider two examples:

  • User X (USA, New York): Sets a reminder at 10:00 AM for a task. The application should send the reminder to User X at 10:00 AM in their local New York time zone.
  • User Y (Russia, Moscow): Sets a reminder at 12:00 AM for a task. The application should send the reminder to User Y at 12:00 AM in their local Moscow time zone.

The Problem:

Currently, the application triggers reminders based on the server's time zone (Asia/Mumbai). This results in incorrect reminder times for users in different locations.

Technology Stack:

  • Frontend: Angular 13
  • Backend: .Net 6 Web API
  • Scheduling: Hangfire

Seeking Help:

I've been unable to resolve this issue on my own. I'd appreciate any suggestions or ideas on how to ensure reminders are sent based on the user's specific time zone.

  • rosseby's avatar
    rosseby
    Copper Contributor

    Praveen1120 

    When you store the reminder in the database, convert it to the server's time zone first so when the server triggers to send the notification it is in sync.

Resources