File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2625,15 +2625,15 @@ namespace jwt {
26252625 /* *
26262626 * \brief Get the contained JSON value as a date
26272627 *
2628- * If the value is a decimal, it is rounded up to the closest integer
2628+ * If the value is a decimal, it is rounded to the closest integer
26292629 *
26302630 * \return content as date
26312631 * \throw std::bad_cast Content was not a date
26322632 */
26332633 date as_date () const {
26342634 using std::chrono::system_clock;
2635- if (get_type () == json::type::number) return system_clock::from_time_t (std::round (as_number ()));
2636- return system_clock::from_time_t (as_integer ());
2635+ if (get_type () == json::type::number) return system_clock::from_time_t (static_cast < std::time_t >( std:: round (as_number () )));
2636+ return system_clock::from_time_t (static_cast <std:: time_t >( as_integer () ));
26372637 }
26382638
26392639 /* *
You can’t perform that action at this time.
0 commit comments