MCPcopy Create free account
hub / github.com/dailydotdev/apps / getUserInitialTimezone

Function getUserInitialTimezone

packages/shared/src/lib/timezones.ts:579–592  ·  view source on GitHub ↗
({
  userTimezone,
  update = false,
}: InitialTimezoneProps = {})

Source from the content-addressed store, hash-verified

577}
578
579export const getUserInitialTimezone = ({
580 userTimezone,
581 update = false,
582}: InitialTimezoneProps = {}): string => {
583 if (userTimezone) {
584 return userTimezone;
585 }
586
587 if (update) {
588 return 'Europe/London';
589 }
590
591 return getUserDefaultTimezone();
592};
593
594export const getHourTimezone = (timeZone: string): number => {
595 const now = new Date();

Callers 2

ReadingReminderFunction · 0.90

Calls 1

getUserDefaultTimezoneFunction · 0.85

Tested by

no test coverage detected