-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Remove moment js #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
source/session.ts
Outdated
// Ensure that the dayjs object is in local time zone and format | ||
// to timezone naive string. | ||
return { | ||
__type__: "datetime", | ||
value: moment(date).local().format(ENCODE_DATETIME_FORMAT), | ||
value: dayjs.utc(date).local().format(ENCODE_DATETIME_FORMAT), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this also? @jimmycallin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need an alternative to replace this? Because in this case, when serverInformation
and timezone
is enabled we will return an object { __type__: "datetime", value:date }
. Otherwise, we will return the data
instead of date
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_timezone_support_enabled
is a separate from recently implemented use_workspace_timezone_enabled
- it's an old flag that should always be enabled. we can remove this check and only support when it's true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a bit uncertain about my implementation. Can you check this commit f71e035?
Resolves F-168
Changes
All moment js instances is replaced by dayjs instances.
Test
TBD