mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-07-17 22:17:10 +02:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// DateTime.cpp
|
||||
//
|
||||
// This sample demonstrates the DateTime class.
|
||||
//
|
||||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/LocalDateTime.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/DateTimeFormat.h"
|
||||
#include "Poco/DateTimeFormatter.h"
|
||||
#include "Poco/DateTimeParser.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using Poco::LocalDateTime;
|
||||
using Poco::DateTime;
|
||||
using Poco::DateTimeFormat;
|
||||
using Poco::DateTimeFormatter;
|
||||
using Poco::DateTimeParser;
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
LocalDateTime now;
|
||||
|
||||
std::string str = DateTimeFormatter::format(now, DateTimeFormat::ISO8601_FORMAT);
|
||||
DateTime dt;
|
||||
int tzd;
|
||||
DateTimeParser::parse(DateTimeFormat::ISO8601_FORMAT, str, dt, tzd);
|
||||
dt.makeUTC(tzd);
|
||||
LocalDateTime ldt(tzd, dt);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user