Skip to content

Commit

Permalink
Use std::chrono::zoned_time
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <[email protected]>
  • Loading branch information
jjerphan committed Apr 9, 2024
1 parent 971dcd9 commit d2b453d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/sparrow/data_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "fixed_size_layout.hpp"
#include "variable_size_binary_layout.hpp"

using time_point = std::chrono::time_point<std::chrono::system_clock>;
using zoned_time = std::chrono::zoned_time<std::chrono::nanoseconds>;

namespace sparrow
{
Expand Down Expand Up @@ -128,7 +128,7 @@ namespace sparrow
};

template <>
struct arrow_traits<time_point> : common_native_types_traits<time_point>
struct arrow_traits<zoned_time> : common_native_types_traits<zoned_time>
{
static constexpr data_type type_id = data_type::TIMESTAMP;
};
Expand Down
2 changes: 1 addition & 1 deletion include/sparrow/data_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ namespace sparrow
float64_t,
std::string,
std::vector<byte_t>,
std::chrono::time_point<std::chrono::system_clock>
std::chrono::zoned_time<std::chrono::nanoseconds>
// TODO: add missing fundamental types here
>;

Expand Down

0 comments on commit d2b453d

Please sign in to comment.