make kerberos date time more panic resistent
All checks were successful
Build and Test / fast-racing-neo (push) Successful in 4m10s
Build and Test / wii-sports-club (push) Successful in 4m50s
Build and Test / mario-tennis (push) Successful in 4m51s
Build and Test / minecraft-wiiu (push) Successful in 4m53s
Build and Test / puyopuyo (push) Successful in 4m53s
Build and Test / wii-u-chat (push) Successful in 4m52s
Build and Test / splatoon (push) Successful in 5m6s
Build and Test / sonic-transformed (push) Successful in 5m8s
Build and Test / splatoon-testfire (push) Successful in 5m8s
Build and Test / friends (push) Successful in 5m13s
Build and Test / super-mario-maker (push) Successful in 5m52s
All checks were successful
Build and Test / fast-racing-neo (push) Successful in 4m10s
Build and Test / wii-sports-club (push) Successful in 4m50s
Build and Test / mario-tennis (push) Successful in 4m51s
Build and Test / minecraft-wiiu (push) Successful in 4m53s
Build and Test / puyopuyo (push) Successful in 4m53s
Build and Test / wii-u-chat (push) Successful in 4m52s
Build and Test / splatoon (push) Successful in 5m6s
Build and Test / sonic-transformed (push) Successful in 5m8s
Build and Test / splatoon-testfire (push) Successful in 5m8s
Build and Test / friends (push) Successful in 5m13s
Build and Test / super-mario-maker (push) Successful in 5m52s
This commit is contained in:
parent
36315ca58e
commit
ad14fe02be
1 changed files with 3 additions and 3 deletions
|
|
@ -85,20 +85,20 @@ impl KerberosDateTime {
|
|||
pub const fn get_year(&self) -> u64 {
|
||||
(self.0 >> 26) & 0xFFFFFFFF
|
||||
}
|
||||
pub const fn to_regular_time(&self) -> chrono::DateTime<Utc> {
|
||||
pub fn to_regular_time(&self) -> chrono::DateTime<Utc> {
|
||||
NaiveDateTime::new(
|
||||
NaiveDate::from_ymd_opt(
|
||||
self.get_year() as i32,
|
||||
self.get_month() as u32,
|
||||
self.get_days() as u32,
|
||||
)
|
||||
.unwrap(),
|
||||
.unwrap_or_default(),
|
||||
NaiveTime::from_hms_opt(
|
||||
self.get_hours() as u32,
|
||||
self.get_minutes() as u32,
|
||||
self.get_seconds() as u32,
|
||||
)
|
||||
.unwrap(),
|
||||
.unwrap_or_default(),
|
||||
)
|
||||
.and_utc()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue