Skip to content

Commit 662a646

Browse files
committed
✨ feat: main.ts에서 타임존을 'Asia/Seoul'로 설정
어느 실행 환경에서도 동일한 타임존을 보장하기 위해 설정함. Issue Resolved: #
1 parent 4cb4f22 commit 662a646

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

back/src/domains/booking/service/booking.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import { InBookingService } from './in-booking.service';
1515
import { OpenBookingService } from './open-booking.service';
1616
import { WaitingQueueService } from './waiting-queue.service';
1717

18-
const OFFSET = 1000 * 60 * 60 * 9;
19-
2018
@Injectable()
2119
export class BookingService {
2220
private logger = new Logger(BookingService.name);
@@ -102,7 +100,8 @@ export class BookingService {
102100
async isAdmission(eventId: number, sid: string): Promise<BookingAdmissionStatusDto> {
103101
// eventId를 받아서 해당 이벤트가 존재하는지 확인한다.
104102
const event = await this.eventService.findEvent({ eventId });
105-
const now = new Date(Date.now() + OFFSET);
103+
const now = new Date();
104+
106105
const isOpened = await this.openBookingService.isEventOpened(eventId);
107106

108107
if (!isOpened) {

back/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ async function bootstrap() {
1111
const app = await NestFactory.create(AppModule, {
1212
logger: winstonLoggerConfig,
1313
});
14+
process.env.TZ = 'Asia/Seoul';
1415
setupSwagger(app);
1516
app.enableCors({
1617
origin: '*',

0 commit comments

Comments
 (0)