mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
Merge pull request 'fix: local time for users' (#9741) from naskya/calckey:fix/localtime into develop
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9741
This commit is contained in:
commit
c5fa6e2820
@ -167,8 +167,8 @@ const timeForThem = $computed(() => {
|
|||||||
const tzInfo = cityTimezones.lookupViaCity(props.user.location!.replace(/\s.*/,''));
|
const tzInfo = cityTimezones.lookupViaCity(props.user.location!.replace(/\s.*/,''));
|
||||||
if (tzInfo.length == 0) return "";
|
if (tzInfo.length == 0) return "";
|
||||||
const tz = tzInfo[0].timezone;
|
const tz = tzInfo[0].timezone;
|
||||||
const theirTime = new Date().toLocaleString("en-US", { timeZone: tz, hour12: true })
|
const theirTime = new Date().toLocaleString("en-US", { timeZone: tz, hour12: false });
|
||||||
return ` (${theirTime.split(",")[1].trim().split(":")[0]} ${theirTime.split(" ")[1].slice(-2)})`
|
return ` (${theirTime.split(",")[1].trim().split(":")[0]}:${theirTime.split(" ")[1].slice(-5,-3)})`;
|
||||||
})
|
})
|
||||||
|
|
||||||
function menu(ev) {
|
function menu(ev) {
|
||||||
|
Loading…
Reference in New Issue
Block a user