mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
fix: fromUniversalTime & fromLocalTime
This commit is contained in:
parent
87e579ad1a
commit
aa73a4b72e
2 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ impl DateTimeBuilder {
|
||||||
{
|
{
|
||||||
let format = match format {
|
let format = match format {
|
||||||
Some(fmt) => fmt.to_string(),
|
Some(fmt) => fmt.to_string(),
|
||||||
None => "%Y-%m-%dT%H:%M:%SZUTC+%z".to_string(),
|
None => "%Y-%m-%dT%H:%M:%SZ".to_string(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let locale = match locale {
|
let locale = match locale {
|
||||||
|
|
|
@ -153,7 +153,7 @@ impl<'lua> FromLua<'lua> for DateTimeBuilder {
|
||||||
.with_hour(t.get("hour")?)
|
.with_hour(t.get("hour")?)
|
||||||
.with_minute(t.get("minute")?)
|
.with_minute(t.get("minute")?)
|
||||||
.with_second(t.get("second")?)
|
.with_second(t.get("second")?)
|
||||||
.with_millisecond(t.get("millisecond")?)
|
.with_millisecond(t.get("millisecond").or(LuaResult::Ok(0))?)
|
||||||
.build()),
|
.build()),
|
||||||
_ => Err(LuaError::external(
|
_ => Err(LuaError::external(
|
||||||
"expected type table for DateTimeBuilder",
|
"expected type table for DateTimeBuilder",
|
||||||
|
|
Loading…
Add table
Reference in a new issue