Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
NEUpanning committed May 17, 2024
1 parent 187fa91 commit c467555
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion velox/type/Timestamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct Timestamp {
/// Due to the limit of std::chrono, throws if timestamp is outside of
/// [-32767-01-01, 32767-12-31] range.
/// If allowOverflow is true, integer overflow is allowed in converting
/// timestmap to milliseconds.
/// timestamp to milliseconds.
std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>
toTimePoint(bool allowOverflow = false) const;

Expand Down Expand Up @@ -313,6 +313,8 @@ struct Timestamp {

// Assuming the timestamp represents a GMT time, converts it to the time at
// the same moment at zone.
// If allowOverflow is true, integer overflow is allowed in converting
// timestamp to TimePoint, otherwise we throw.
// Example: Timestamp ts{0, 0};
// ts.Timezone("America/Los_Angeles");
// ts.toString() returns December 31, 1969 16:00:00
Expand Down

0 comments on commit c467555

Please sign in to comment.