mirror of
https://github.com/PerMalmberg/libcron.git
synced 2025-04-22 08:23:04 -05:00
Added note about UTC.
This commit is contained in:
parent
d7c17be4d1
commit
be2b4424a1
@ -1,6 +1,10 @@
|
|||||||
# libcron
|
# libcron
|
||||||
A C++ scheduling library using cron formatting.
|
A C++ scheduling library using cron formatting.
|
||||||
|
|
||||||
|
# Time zones
|
||||||
|
|
||||||
|
This library uses `std::chrono::system_clock::timepoint` as its time unit, thus all calculations are in UTC.
|
||||||
|
|
||||||
# Supported formatting
|
# Supported formatting
|
||||||
|
|
||||||
This implementation supports cron format, as specified below.
|
This implementation supports cron format, as specified below.
|
||||||
@ -60,3 +64,8 @@ the '?'-character unless one field already is something other than '*'.
|
|||||||
|0 0 12 * * MON-FRI | Every Weekday at noon
|
|0 0 12 * * MON-FRI | Every Weekday at noon
|
||||||
|0 0 12 1/2 * ? | Every 2 days, starting on the 1st at noon
|
|0 0 12 1/2 * ? | Every 2 days, starting on the 1st at noon
|
||||||
| 0 0 */12 ? * * | Every twelve hours
|
| 0 0 */12 ? * * | Every twelve hours
|
||||||
|
|
||||||
|
# Third party libraries
|
||||||
|
|
||||||
|
Howard Hinnant's [date.h](https://github.com/HowardHinnant/date/)
|
||||||
|
|
||||||
|
@ -207,9 +207,24 @@ SCENARIO("Examples from README.md")
|
|||||||
DT(2018_y / 8 / 16, hours{12}),
|
DT(2018_y / 8 / 16, hours{12}),
|
||||||
DT(2018_y / 8 / 17, hours{0})
|
DT(2018_y / 8 / 17, hours{0})
|
||||||
}));
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SCENARIO("Daylight Savings Time")
|
||||||
|
//{
|
||||||
|
// // In sweden when local standard time is about to reach
|
||||||
|
// //Sunday, 25 March 2018, 02:00:00 clocks are turned forward 1 hour to
|
||||||
|
// //Sunday, 25 March 2018, 03:00:00 local daylight time instead.
|
||||||
|
//
|
||||||
|
// REQUIRE(test("0 0 * * * ?", DT(2018_y / 3 / 25, hours{0}),
|
||||||
|
// {
|
||||||
|
// DT(2018_y / 3 / 25, hours{0}),
|
||||||
|
// DT(2018_y / 3 / 25, hours{1}),
|
||||||
|
// // This hour disappear! DT(2018_y / 3 / 25, hours{2}),
|
||||||
|
// DT(2018_y / 3 / 25, hours{3}),
|
||||||
|
// DT(2018_y / 3 / 25, hours{4})
|
||||||
|
// }));
|
||||||
|
//}
|
||||||
|
|
||||||
SCENARIO("Unable to calculate time point")
|
SCENARIO("Unable to calculate time point")
|
||||||
{
|
{
|
||||||
// TODO: Find a schedule that is unsolvable.
|
// TODO: Find a schedule that is unsolvable.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user