Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite19b3dc

Browse files
committed
Rename PG_EPOCH
1 parent815a5d3 commite19b3dc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎postgres-types/src/jiff_01.rs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use bytes::BytesMut;
22
use jiff_01::{
33
civil::{Date,DateTime,Time},
4-
tz::TimeZone,
5-
Span,Timestamp,Zoned,
4+
Span,Timestamp,
65
};
76
use postgres_protocol::types;
87
use std::error::Error;
@@ -13,11 +12,11 @@ const fn base() -> DateTime {
1312
DateTime::constant(2000,1,1,0,0,0,0)
1413
}
1514

16-
/// The number of seconds from 2000-01-01 00:00:00 UTC to the Unix epoch.
17-
constY2K_EPOCH:i64 =946684800;
15+
/// The number of seconds fromthe Unix epoch to2000-01-01 00:00:00 UTC.
16+
constPG_EPOCH:i64 =946684800;
1817

1918
fnbase_ts() ->Timestamp{
20-
Timestamp::new(Y2K_EPOCH,0).unwrap()
19+
Timestamp::new(PG_EPOCH,0).unwrap()
2120
}
2221

2322
impl<'a>FromSql<'a>forDateTime{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp