We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SELECT
This might be useful in the future.
Retrieve the timezone offset from UTC.
#include <iostream> #include <chrono> #include <ctime> int main() { std::time_t now = std::time(nullptr); std::tm local_time = *std::localtime(&now); int offset_minutes = local_time.tm_gmtoff / 60; std::cout << "Timezone offset from UTC: " << offset_minutes << " minutes." << std::endl; return 0; }
Perform timezone conversion directly from a SELECT statement.
fmt::format("select datetime(timestamp, 'unixepoch', '{}{} minutes')", offset < 0 ? '-' : '+', offset);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This might be useful in the future.
Retrieve the timezone offset from UTC.
Perform timezone conversion directly from a
SELECT
statement.The text was updated successfully, but these errors were encountered: