Project

General

Profile

Actions

Improvements #8508

closed
RS RM

Use C++20's time zone support in std::chrono by default if supported.

Improvements #8508: Use C++20's time zone support in std::chrono by default if supported.

Added by Roel Standaert over 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
05/27/2021
Due date:
% Done:

100%

Estimated time:

Description

C++ compiler and STL implementations are getting C++20 feature complete, so we can look into replacing the date library with it. This would be especially nice on Windows, since using time zones on Windows would not require extra setup anymore.

This was done in issue #8595 similarly to how we do Wt::cpp17::any:

  • Have a CMake option to select the implementation, defaulting to the STL implementation if supported
  • Introduce a Wt::cpp20::chrono namespace that is aliased to std::chrono or date

WDate, WTime, WDateTime, and WLocalDateTime may no longer be necessary. We could look into adding overrides in the right places, so that their use can be avoided if desired.


Related issues 1 (0 open1 closed)

Follows Feature #8595: Add the option to use std::chrono's date and time zone supportClosedRoel Standaert05/26/2021

Actions

RS Updated by Roel Standaert about 5 years ago Actions #1

  • Due date set to 05/27/2021
  • Start date changed from 05/26/2021 to 05/27/2021
  • Follows Feature #8595: Add the option to use std::chrono's date and time zone support added

RS Updated by Roel Standaert about 5 years ago Actions #2

  • % Done changed from 100 to 0

RS Updated by Roel Standaert about 5 years ago Actions #3

  • Due date deleted (05/27/2021)

RK Updated by ruben kindt about 5 years ago Actions #4

  • Assignee set to ruben kindt

RS Updated by Roel Standaert almost 5 years ago Actions #5

  • Description updated (diff)

Updated the description to more accurately reflect the fact that we already implemented those two bullet points in issue #8595.

RS Updated by Roel Standaert almost 5 years ago Actions #6

What remains now is to automatically determine whether we can use std::chrono for time zones, and enable it by default if available, still allowing the user to specify which one they want to use.

What also remains is the ability to take a std::chrono::year_month_day instead of a WDate in places like WDateEdit, so we don't need to necessarily use WDate anymore, and similar things for WTime, WDateTime, and WLocalDateTime.

RS Updated by Roel Standaert almost 4 years ago Actions #7

  • Assignee deleted (ruben kindt)

MV Updated by Matthias Van Ceulebroeck almost 2 years ago Actions #8

  • Assignee set to Romain Mardulyn
  • Target version changed from future to 4.11.2

RM Updated by Romain Mardulyn almost 2 years ago Actions #9

  • Status changed from New to InProgress

RM Updated by Romain Mardulyn almost 2 years ago Actions #10

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #11

  • Tracker changed from Feature to Improvements
  • Assignee set to Matthias Van Ceulebroeck

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #12

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Matthias Van Ceulebroeck to Romain Mardulyn
  • % Done changed from 0 to 100

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #13

  • Status changed from Implemented @Emweb to Implemented @Test

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #14

  • Status changed from Implemented @Test to Closed
Actions

Also available in: PDF Atom