Skip to content

Commit

Permalink
show momentTz now
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHorn07 committed Dec 11, 2023
1 parent a4c5337 commit bc067b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Injectable } from '@nestjs/common';
import * as moment from 'moment';
import * as momentTz from "moment-timezone";

@Injectable()
export class AppService {
getHello(): string {
return `Hello POPO! (popo-${process.env.POPO_VERSION}) (now: ${moment().format('YYYY-MM-DD HH:mm:ss')})`;
return `Hello POPO! (popo-${process.env.POPO_VERSION}) (server now: ${moment().format('YYYY-MM-DD HH:mm:ss')}, KST now: ${momentTz().tz("Asia/Seoul").format('YYYY-MM-DD HH:mm:ss')})`;
}
}

0 comments on commit bc067b1

Please sign in to comment.