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 {
2625
2625
/* *
2626
2626
* \brief Get the contained JSON value as a date
2627
2627
*
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
2629
2629
*
2630
2630
* \return content as date
2631
2631
* \throw std::bad_cast Content was not a date
2632
2632
*/
2633
2633
date as_date () const {
2634
2634
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 () ));
2637
2637
}
2638
2638
2639
2639
/* *
You can’t perform that action at this time.
0 commit comments