Project

General

Profile

Actions

Feature #8508

open

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

Added by Roel Standaert over 3 years ago. Updated about 2 months ago.

Status:
Review
Priority:
Normal
Assignee:
-
Target version:
Start date:
05/27/2021
Due date:
% Done:

0%

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
Actions #1

Updated by Roel Standaert over 3 years ago

  • 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
Actions #2

Updated by Roel Standaert over 3 years ago

  • % Done changed from 100 to 0
Actions #3

Updated by Roel Standaert over 3 years ago

  • Due date deleted (05/27/2021)
Actions #4

Updated by ruben kindt over 3 years ago

  • Assignee set to ruben kindt
Actions #5

Updated by Roel Standaert over 3 years ago

  • Description updated (diff)

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

Actions #6

Updated by Roel Standaert over 3 years ago

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.

Actions #7

Updated by Roel Standaert over 2 years ago

  • Assignee deleted (ruben kindt)
Actions #8

Updated by Matthias Van Ceulebroeck 3 months ago

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

Updated by Romain Mardulyn 3 months ago

  • Status changed from New to InProgress
Actions #10

Updated by Romain Mardulyn about 2 months ago

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

Also available in: Atom PDF