Skip to content
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

[releases/25.0] Unix Timestamp test should use offset for the specified date #2300

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ codeunit 132980 "Unix Timestamp Test"
// [GIVEN] A DateTime with value 2024-07-01 06:30:30 in the user time zone
GivenDateTime := CreateDateTime(20240701D, 063030T);
// [GIVEN] The offset of the session's timezone
Offset := TimeZone.GetTimezoneOffset(CurrentDateTime);
Offset := TimeZone.GetTimezoneOffset(GivenDateTime);

// [WHEN] Given DateTime is converted to a Unix timestamp after a correction for timezone offset
ResultTimestamp := UnixTimestamp.CreateTimestampSeconds(GivenDateTime + Offset);
Expand All @@ -52,7 +52,7 @@ codeunit 132980 "Unix Timestamp Test"
// [GIVEN] A DateTime with value 2024-07-01 06:30:30 in the user time zone
GivenDateTime := CreateDateTime(20240701D, 063030T);
// [GIVEN] The offset of the session's timezone
Offset := TimeZone.GetTimezoneOffset(CurrentDateTime);
Offset := TimeZone.GetTimezoneOffset(GivenDateTime);

// [WHEN] Given DateTime is converted to a Unix timestamp after a correction for timezone offset
ResultTimestamp := UnixTimestamp.CreateTimestampMilliseconds(GivenDateTime + Offset);
Expand Down
Loading