Skip to content

Commit 83bf6c9

Browse files
committed
add files
1 parent 177d65c commit 83bf6c9

3 files changed

Lines changed: 198 additions & 0 deletions

File tree

.gitignore

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Compiled #
2+
############
3+
*.com
4+
*.class
5+
*.dll
6+
*.dylib
7+
*.exe
8+
*.slo
9+
*.lo
10+
*.o
11+
*.so
12+
*.lai
13+
*.la
14+
*.a
15+
*.d
16+
*.vsp
17+
*.psess
18+
19+
# Gradle #
20+
##########
21+
!gradle.properties
22+
!settings.gradle
23+
!build.gradle
24+
!build.gradle.win
25+
!travis/.gradle/gradle.properties
26+
.gradle/
27+
**/guild/
28+
coverage/
29+
30+
# NuGet #
31+
#########
32+
*.nupkg
33+
34+
# WiX #
35+
#######
36+
*.msi
37+
*.wixobj
38+
*.wixpdb
39+
40+
# Make #
41+
########
42+
config.build
43+
config.make
44+
45+
# CLion #
46+
########
47+
.idea/
48+
49+
# CMake #
50+
########
51+
cmake_install.cmake
52+
cmake_uninstall.cmake
53+
CMakeFiles
54+
CMakeCache.txt
55+
CPackConfig.cmake
56+
CPackSourceConfig.cmake
57+
cmake_*
58+
cmake-build-*
59+
60+
# Packages #
61+
############
62+
# it's better to unpack these files and commit the raw source
63+
# git has its own built in compression methods
64+
*.7z
65+
*.dmg
66+
*.gz
67+
*.iso
68+
*.jar
69+
*.rar
70+
*.tar
71+
*.zip
72+
73+
# Logs and databases #
74+
######################
75+
*.log*
76+
*.sqlite
77+
*.db
78+
test*.txt
79+
XML/testsuite/rss.xml
80+
81+
# OS generated files #
82+
######################
83+
.DS_Store
84+
.DS_Store?
85+
._*
86+
.Spotlight-V100
87+
.Trashes
88+
Icon?
89+
ehthumbs.db
90+
Thumbs.db
91+
*~
92+
93+
# VS generated files #
94+
######################
95+
*.obj
96+
*.exe
97+
*.pdb
98+
*.user
99+
*.aps
100+
*.pch
101+
*.ipch
102+
*.ncb
103+
*.suo
104+
*.sdf
105+
*.opensdf
106+
*.tlb
107+
*.tlh
108+
*.ilk
109+
*.lib
110+
*.exp
111+
*.idb
112+
*.rc
113+
*.res
114+
*.manifest
115+
*.tlog
116+
*.lastbuildstate
117+
*.unsuccessfulbuild
118+
*.opendb
119+
.vs/
120+
release_shared/
121+
debug_shared/
122+
release_static/
123+
debug_static/
124+
release_static_md/
125+
debug_static_md/
126+
release_static_mt/
127+
debug_static_mt/
128+
bin/
129+
bin64/
130+
lib/
131+
lib64/
132+
pocomsg.h
133+
**/UpgradeLog*.XML
134+
135+
# Eclipse generated files #
136+
###########################
137+
.project
138+
.cproject
139+
.settings
140+
cmake-build/
141+
142+
# Temporary files #
143+
###################
144+
*.bak
145+
stage/
146+
releases/

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.11)
2+
3+
project(poco-example)
4+
5+
include(FetchContent)
6+
FetchContent_Declare(
7+
Poco
8+
URL https://github.com/pocoproject/poco/archive/refs/tags/poco-1.10.1-release.zip
9+
)
10+
FetchContent_MakeAvailable(Poco)
11+
12+
add_executable(pocoex main.cpp)
13+
target_link_libraries(pocoex PUBLIC Poco::Foundation)

main.cpp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// DateTime.cpp
3+
//
4+
// This sample demonstrates the DateTime class.
5+
//
6+
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
7+
// and Contributors.
8+
//
9+
// SPDX-License-Identifier: BSL-1.0
10+
//
11+
12+
13+
#include "Poco/LocalDateTime.h"
14+
#include "Poco/DateTime.h"
15+
#include "Poco/DateTimeFormat.h"
16+
#include "Poco/DateTimeFormatter.h"
17+
#include "Poco/DateTimeParser.h"
18+
#include <iostream>
19+
20+
21+
using Poco::LocalDateTime;
22+
using Poco::DateTime;
23+
using Poco::DateTimeFormat;
24+
using Poco::DateTimeFormatter;
25+
using Poco::DateTimeParser;
26+
27+
28+
int main(int argc, char** argv)
29+
{
30+
LocalDateTime now;
31+
32+
std::string str = DateTimeFormatter::format(now, DateTimeFormat::ISO8601_FORMAT);
33+
DateTime dt;
34+
int tzd;
35+
DateTimeParser::parse(DateTimeFormat::ISO8601_FORMAT, str, dt, tzd);
36+
dt.makeUTC(tzd);
37+
LocalDateTime ldt(tzd, dt);
38+
return 0;
39+
}

0 commit comments

Comments
 (0)