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

Feature/1601 ensure utc in database #46

Merged
merged 8 commits into from
Jun 11, 2024

Conversation

turegjorup
Copy link
Contributor

Link to ticket

https://leantime.itkdev.dk/dashboard/show#/tickets/showTicket/1601

Description

Ensure all datetime fields are persisted as UTC in the database. See ADR 008 for background and discussion.

Screenshot of the result

N/A

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change
should be exempt from the list.

Additional comments or questions

If you have any further comments or questions for the reviewer please add them here.

@turegjorup turegjorup self-assigned this Jun 10, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 66 lines in your changes missing coverage. Please review.

Project coverage is 0.39%. Comparing base (d9b8080) to head (2cfe8c0).
Report is 10 commits behind head on develop.

Files Patch % Lines
...Extensions/DBAL/Types/UTCDateTimeImmutableType.php 0.00% 17 Missing ⚠️
...Doctrine/Extensions/DBAL/Types/UTCDateTimeType.php 0.00% 16 Missing ⚠️
src/EasyAdmin/DateTimeFieldConfigurator.php 0.00% 10 Missing ⚠️
src/EasyAdmin/DateTimeFilterConfigurator.php 0.00% 9 Missing ⚠️
src/Controller/Admin/OccurrenceCrudController.php 0.00% 8 Missing ⚠️
src/Controller/Admin/DashboardController.php 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             develop     #46      +/-   ##
============================================
- Coverage       0.40%   0.39%   -0.02%     
- Complexity       861     896      +35     
============================================
  Files            124     128       +4     
  Lines           3174    3260      +86     
============================================
  Hits              13      13              
- Misses          3161    3247      +86     
Flag Coverage Δ
8.3 0.39% <0.00%> (-0.02%) ⬇️
unittests 0.39% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +27 to +34
public const string VIEW_TIMEZONE = 'Europe/Copenhagen';

// Default date time format used in the UI.
//
// @see https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax
public const DATETIME_FORMAT = 'dd-MM-Y HH:mm:ss';
public const string DATETIME_FORMAT = 'dd-MM-Y HH:mm:ss';
public const string TIME_FORMAT = 'HH:mm:ss';
public const string DATE_FORMAT = 'dd-MM-Y';
Copy link
Contributor

Choose a reason for hiding this comment

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

Getting the “view” and “format” values from config (.env.local) would be really nice, but it may require a lot of effort.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are unlikely to change in the applications lifetime so will leave as is for now.

@turegjorup turegjorup merged commit 6ab5440 into develop Jun 11, 2024
7 checks passed
@turegjorup turegjorup deleted the feature/1601_ensure_utc_in_database branch June 11, 2024 08:14
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.

3 participants