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

fix: Render timestamp of protobuf in UTC #98

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

honnix
Copy link
Member

@honnix honnix commented Sep 25, 2020

TL;DR

Render timestamp of protobuf in UTC.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

When rendering a timestamp field of protobuf, local time instead of UTC is used. This is not consistent with other part of the UI. This PR switches to UTC instead of local timezone.

Tracking Issue

flyteorg/flyte#80

Follow-up issue

NA

@honnix
Copy link
Member Author

honnix commented Sep 25, 2020

@BobNisco PTAL, thanks.

@codecov-commenter
Copy link

Codecov Report

Merging #98 into master will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage   67.63%   67.73%   +0.10%     
==========================================
  Files         371      371              
  Lines        5994     5994              
  Branches      933      933              
==========================================
+ Hits         4054     4060       +6     
+ Misses       1940     1934       -6     
Impacted Files Coverage Δ
src/components/Literals/Scalar/PrimitiveValue.tsx 62.50% <100.00%> (+37.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c29c0ee...44648bd. Read the comment docs.

@honnix
Copy link
Member Author

honnix commented Sep 25, 2020

cc @sonjaer @ckiosidis

@@ -10,7 +10,7 @@ function primitiveToString(primitive: Primitive): string {
case 'boolean':
return !!primitive.boolean ? 'true' : 'false';
case 'datetime':
return formatDate(timestampToDate(primitive.datetime!));
return formatDateUTC(timestampToDate(primitive.datetime!));
Copy link
Contributor

@EngHabu EngHabu Sep 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the dates that show in the "Inputs/Outputs" tab for a task/execution?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Literals components are used anywhere we render a flyte Literal value to the screen. So that would be the inputs/outputs modal for workflow executions, the inputs/outputs tab in the details panel for a task execution, and I think maybe certain cases in the Launch form when rendering a fixed input value that the user cannot change.

@schottra
Copy link
Contributor

@honnix Thanks for taking care of this!

@service-github-lyft-semantic-release
Copy link
Contributor

🎉 This PR is included in version 0.12.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@honnix honnix deleted the utc-when-rendering-timestamp branch September 25, 2020 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants