GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::chrono::current_zone(3) C++ Standard Libary std::chrono::current_zone(3)

std::chrono::current_zone - std::chrono::current_zone


Defined in header <chrono>
const std::chrono::time_zone* current_zone(); (since C++20)


Convenience function for obtaining local time zone from the time zone database.
Equivalent to std::chrono::get_tzdb().current_zone().


std::runtime_error if this is the first reference to the time zone database and the
time zone database cannot be initialized.


A call to this function that is the first reference to the time zone database will
cause it to be initialized.

// Run this code


#include <chrono>
#include <iostream>


int main() {
const std::chrono::zoned_time cur_time{ std::chrono::current_zone(),
std::chrono::system_clock::now() };
std::cout << cur_time << '\n';
}


2021-09-13 19:46:42.249182012 MAGT


current_zone return the local time zone
(public member function of std::chrono::tzdb)
get_tzdb
get_tzdb_list accesses and controls the global time zone database information
reload_tzdb (function)
remote_version
(C++20)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.