Skip to content

Commit

Permalink
feat: add timezone plugin to dayjs
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Nov 23, 2023
1 parent 52bb811 commit 1fe8ff6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/init.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import dayjs from 'dayjs';
import timezone from 'dayjs/plugin/timezone';
import utc from 'dayjs/plugin/utc';

dayjs.extend(utc);
dayjs.extend(timezone);
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import cookieParser from 'cookie-parser';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import cookieParser from 'cookie-parser';
import { AppModule } from './app.module';
import './init';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
Expand Down

0 comments on commit 1fe8ff6

Please sign in to comment.