fix: moment timezone
This commit is contained in:
parent
7fa7e4448d
commit
fbe452612f
@ -29,7 +29,7 @@
|
|||||||
"@nestjs/platform-socket.io": "^10.4.12",
|
"@nestjs/platform-socket.io": "^10.4.12",
|
||||||
"@nestjs/swagger": "^8.0.7",
|
"@nestjs/swagger": "^8.0.7",
|
||||||
"@nestjs/websockets": "^10.4.12",
|
"@nestjs/websockets": "^10.4.12",
|
||||||
"@prisma/client": "^6.1.0",
|
"@prisma/client": "^6.2.1",
|
||||||
"axios": "^1.7.7",
|
"axios": "^1.7.7",
|
||||||
"class-transformer": "^0.5.1",
|
"class-transformer": "^0.5.1",
|
||||||
"class-validator": "^0.14.1",
|
"class-validator": "^0.14.1",
|
||||||
@ -37,8 +37,9 @@
|
|||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"jwks-rsa": "^3.1.0",
|
"jwks-rsa": "^3.1.0",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
|
"moment-timezone": "^0.5.46",
|
||||||
"nestjs-prisma": "^0.23.0",
|
"nestjs-prisma": "^0.23.0",
|
||||||
"prisma": "^6.1.0",
|
"prisma": "^6.2.1",
|
||||||
"reflect-metadata": "^0.2.0",
|
"reflect-metadata": "^0.2.0",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"socket.io": "^4.8.1"
|
"socket.io": "^4.8.1"
|
||||||
|
@ -44,7 +44,7 @@ model Class {
|
|||||||
model Room {
|
model Room {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
name String
|
name String
|
||||||
date DateTime
|
date DateTime @db.Date
|
||||||
Presentator User @relation("Presentator", fields: [presentatorId], references: [id])
|
Presentator User @relation("Presentator", fields: [presentatorId], references: [id])
|
||||||
presentatorId String
|
presentatorId String
|
||||||
|
|
||||||
@ -57,8 +57,8 @@ model Room {
|
|||||||
|
|
||||||
model RoomTime {
|
model RoomTime {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
startTime DateTime
|
startTime DateTime @db.Time
|
||||||
endTime DateTime
|
endTime DateTime @db.Time
|
||||||
Room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
Room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||||
roomId String
|
roomId String
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import { UpdateClassDto } from "./dto/update-class.dto";
|
|||||||
import { PrismaService } from "nestjs-prisma";
|
import { PrismaService } from "nestjs-prisma";
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "@prisma/client";
|
||||||
import { CreateRoomClassDto } from "./dto/create-room.dto";
|
import { CreateRoomClassDto } from "./dto/create-room.dto";
|
||||||
import * as moment from "moment";
|
import * as moment from "moment-timezone";
|
||||||
|
|
||||||
|
moment.tz.setDefault("UTC");
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ClassService {
|
export class ClassService {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { ApiProperty } from "@nestjs/swagger";
|
import { ApiProperty } from "@nestjs/swagger";
|
||||||
import { IsArray, IsString, Matches } from "class-validator";
|
import { IsArray, IsDateString, IsString, Matches } from "class-validator";
|
||||||
|
|
||||||
export class CreateRoomClassDto {
|
export class CreateRoomClassDto {
|
||||||
@IsString()
|
@IsString()
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@IsString()
|
@IsDateString()
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
date: string;
|
date: string;
|
||||||
|
|
||||||
|
83
yarn.lock
83
yarn.lock
@ -414,46 +414,46 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31"
|
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31"
|
||||||
integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==
|
integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==
|
||||||
|
|
||||||
"@prisma/client@^6.1.0":
|
"@prisma/client@^6.2.1":
|
||||||
version "6.1.0"
|
version "6.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-6.1.0.tgz#179d3b70586e7be522f6f1f0a82cca01396f719a"
|
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-6.2.1.tgz#3d7d0c8669bba490247e1ffff67b93a516bd789f"
|
||||||
integrity sha512-AbQYc5+EJKm1Ydfq3KxwcGiy7wIbm4/QbjCKWWoNROtvy7d6a3gmAGkKjK0iUCzh+rHV8xDhD5Cge8ke/kiy5Q==
|
integrity sha512-msKY2iRLISN8t5X0Tj7hU0UWet1u0KuxSPHWuf3IRkB4J95mCvGpyQBfQ6ufcmvKNOMQSq90O2iUmJEN2e5fiA==
|
||||||
|
|
||||||
"@prisma/debug@6.1.0":
|
"@prisma/debug@6.2.1":
|
||||||
version "6.1.0"
|
version "6.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-6.1.0.tgz#a27a1d144f72a3bc95061ecb0255e7554d9d59ec"
|
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-6.2.1.tgz#887719967c4942d125262e48f6c47c45d17c1f61"
|
||||||
integrity sha512-0himsvcM4DGBTtvXkd2Tggv6sl2JyUYLzEGXXleFY+7Kp6rZeSS3hiTW9mwtUlXrwYbJP6pwlVNB7jYElrjWUg==
|
integrity sha512-0KItvt39CmQxWkEw6oW+RQMD6RZ43SJWgEUnzxN8VC9ixMysa7MzZCZf22LCK5DSooiLNf8vM3LHZm/I/Ni7bQ==
|
||||||
|
|
||||||
"@prisma/engines-version@6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959":
|
"@prisma/engines-version@6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69":
|
||||||
version "6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959"
|
version "6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959.tgz#0b21ebf57362ffe35d0760c39855f90bbfa0f2fd"
|
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69.tgz#b84ce3fab44bfa13a22669da02752330b61745b2"
|
||||||
integrity sha512-PdJqmYM2Fd8K0weOOtQThWylwjsDlTig+8Pcg47/jszMuLL9iLIaygC3cjWJLda69siRW4STlCTMSgOjZzvKPQ==
|
integrity sha512-7tw1qs/9GWSX6qbZs4He09TOTg1ff3gYsB3ubaVNN0Pp1zLm9NC5C5MZShtkz7TyQjx7blhpknB7HwEhlG+PrQ==
|
||||||
|
|
||||||
"@prisma/engines@6.1.0":
|
"@prisma/engines@6.2.1":
|
||||||
version "6.1.0"
|
version "6.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-6.1.0.tgz#2195244a8ce33839a8131e4465624e21d1f8d042"
|
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-6.2.1.tgz#14ef56bb780f02871a728667161d997a14aedb69"
|
||||||
integrity sha512-GnYJbCiep3Vyr1P/415ReYrgJUjP79fBNc1wCo7NP6Eia0CzL2Ot9vK7Infczv3oK7JLrCcawOSAxFxNFsAERQ==
|
integrity sha512-lTBNLJBCxVT9iP5I7Mn6GlwqAxTpS5qMERrhebkUhtXpGVkBNd/jHnNJBZQW4kGDCKaQg/r2vlJYkzOHnAb7ZQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@prisma/debug" "6.1.0"
|
"@prisma/debug" "6.2.1"
|
||||||
"@prisma/engines-version" "6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959"
|
"@prisma/engines-version" "6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69"
|
||||||
"@prisma/fetch-engine" "6.1.0"
|
"@prisma/fetch-engine" "6.2.1"
|
||||||
"@prisma/get-platform" "6.1.0"
|
"@prisma/get-platform" "6.2.1"
|
||||||
|
|
||||||
"@prisma/fetch-engine@6.1.0":
|
"@prisma/fetch-engine@6.2.1":
|
||||||
version "6.1.0"
|
version "6.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-6.1.0.tgz#2a5174787bf57c9b1d5d400bb923e0dc6a73a794"
|
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-6.2.1.tgz#cd7eb7428a407105e0f3761dba536aefd41fc7f7"
|
||||||
integrity sha512-asdFi7TvPlEZ8CzSZ/+Du5wZ27q6OJbRSXh+S8ISZguu+S9KtS/gP7NeXceZyb1Jv1SM1S5YfiCv+STDsG6rrg==
|
integrity sha512-OO7O9d6Mrx2F9i+Gu1LW+DGXXyUFkP7OE5aj9iBfA/2jjDXEJjqa9X0ZmM9NZNo8Uo7ql6zKm6yjDcbAcRrw1A==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@prisma/debug" "6.1.0"
|
"@prisma/debug" "6.2.1"
|
||||||
"@prisma/engines-version" "6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959"
|
"@prisma/engines-version" "6.2.0-14.4123509d24aa4dede1e864b46351bf2790323b69"
|
||||||
"@prisma/get-platform" "6.1.0"
|
"@prisma/get-platform" "6.2.1"
|
||||||
|
|
||||||
"@prisma/get-platform@6.1.0":
|
"@prisma/get-platform@6.2.1":
|
||||||
version "6.1.0"
|
version "6.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-6.1.0.tgz#d4394a24ef91af6675a92382ed40e6e6e07eeb13"
|
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-6.2.1.tgz#34313cd0ee3587798ad33a7b57b6342dc8e66426"
|
||||||
integrity sha512-ia8bNjboBoHkmKGGaWtqtlgQOhCi7+f85aOkPJKgNwWvYrT6l78KgojLekE8zMhVk0R9lWcifV0Pf8l3/15V0Q==
|
integrity sha512-zp53yvroPl5m5/gXYLz7tGCNG33bhG+JYCm74ohxOq1pPnrL47VQYFfF3RbTZ7TzGWCrR3EtoiYMywUBw7UK6Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@prisma/debug" "6.1.0"
|
"@prisma/debug" "6.2.1"
|
||||||
|
|
||||||
"@scarf/scarf@=1.4.0":
|
"@scarf/scarf@=1.4.0":
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
@ -2563,7 +2563,14 @@ mkdirp@^0.5.4:
|
|||||||
dependencies:
|
dependencies:
|
||||||
minimist "^1.2.6"
|
minimist "^1.2.6"
|
||||||
|
|
||||||
moment@^2.30.1:
|
moment-timezone@^0.5.46:
|
||||||
|
version "0.5.46"
|
||||||
|
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.46.tgz#a21aa6392b3c6b3ed916cd5e95858a28d893704a"
|
||||||
|
integrity sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw==
|
||||||
|
dependencies:
|
||||||
|
moment "^2.29.4"
|
||||||
|
|
||||||
|
moment@^2.29.4, moment@^2.30.1:
|
||||||
version "2.30.1"
|
version "2.30.1"
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
|
resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
|
||||||
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
|
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
|
||||||
@ -2826,12 +2833,12 @@ prettier@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f"
|
||||||
integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==
|
integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==
|
||||||
|
|
||||||
prisma@^6.1.0:
|
prisma@^6.2.1:
|
||||||
version "6.1.0"
|
version "6.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/prisma/-/prisma-6.1.0.tgz#738f657fdd5ab8e6775f385db81bf7e61c70fbaf"
|
resolved "https://registry.yarnpkg.com/prisma/-/prisma-6.2.1.tgz#457b210326d66d0e6f583cc6f9cd2819b984408f"
|
||||||
integrity sha512-aFI3Yi+ApUxkwCJJwyQSwpyzUX7YX3ihzuHNHOyv4GJg3X5tQsmRaJEnZ+ZyfHpMtnyahhmXVfbTZ+lS8ZtfKw==
|
integrity sha512-hhyM0H13pQleQ+br4CkzGizS5I0oInoeTw3JfLw1BRZduBSQxPILlJLwi+46wZzj9Je7ndyQEMGw/n5cN2fknA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@prisma/engines" "6.1.0"
|
"@prisma/engines" "6.2.1"
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents "2.3.3"
|
fsevents "2.3.3"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user