> For the complete documentation index, see [llms.txt](https://april.gitbook.io/learning-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://april.gitbook.io/learning-js/untitled/15.5/15.5.1.md).

# 15.5.1 서버에서 날짜 생성하기

서버에 날짜를 생성하는 경우 => 항상 UTC 사용 또는 타임존 명시

```javascript
const d = new Date(Date, UTC(2018, 4, 27)); // May 27, 2018 UTC
```

특정 타임존에 있는 서버에서 날짜를 생성하는 경우 => moment.tz

```javascript
const d = moment.tz([2018, 3, 27, 9, 19], 'America/Los_Angeles').toDate();
const s = moment.tz([2018, 3, 27, 9, 19], 'Asia/Seoul').toDate();
```
