27.11.2014 Views

Working with date and time, time spans, time zones as well ... - Poco

Working with date and time, time spans, time zones as well ... - Poco

Working with date and time, time spans, time zones as well ... - Poco

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LocalDateTime dt1(1973, 9, 12, 2, 30, 45); // 1973-09-12 02:30:45<br />

dt1.<strong>as</strong>sign(2006, 10, 13, 13, 45, 12, 345); // 2006-10-13 12:45:12.345<br />

LocalDateTime dt2(3600, 1973, 9, 12, 2, 30, 45, 0, 0); // UTC +1 hour<br />

dt2.<strong>as</strong>sign(3600, 2006, 10, 13, 13, 45, 12, 345, 0);<br />

<strong>Poco</strong>::Timestamp nowTS;<br />

LocalDateTime dt3(3600, nowTS); // construct from Timestamp<br />

}<br />

return 0;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!