# user-timezone

> Format unix timestamp into date time format according to user local timezone

Latest version **1.0.3** (published 2019-05-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install user-timezone
pnpm add user-timezone
yarn add user-timezone
bun add user-timezone
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-05-12 |
| First published | 2019-04-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mukesh Soni, Moment.js contributors |
| Maintainers | mukeshsonyy |
| Keywords | convert unix timestamp into user timezone, utc timezone to user timezone, user timezone, format date time |

## Links

- npm: https://www.npmjs.com/package/user-timezone
- Repository: https://github.com/mukeshsony/user-timezone
- Homepage: https://github.com/mukeshsony/user-timezone.git
- Issues: https://github.com/mukeshsony/user-timezone/issues
- npm.io page: https://npm.io/package/user-timezone

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.24.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2019-05-12
- 1.0.2 — 2019-05-12
- 1.0.1 — 2019-04-25
- 1.0.0 — 2019-04-23

## README

# user-timezone

> Convert UTC unix timestamp into user local datetime using user local timezone



## Install

```
$ npm install --save user-timezone
```


## Usage
```js
import * as usertz from 'user-timezone';

// Convert unix timestamp into date time format

const unixTimeStamp = 1555923762;
const dateTimeFormat = 'MMMM Do, YYYY h:mm ss A';
const datetime = usertz.datetime(unixTimeStamp,dateTimeFormat);

console.log(datetime);
// April 22nd, 2019 2:32 42 PM


// Get user local time zone 
const timezone = usertz.getTimeZone();
console.log(timezone);
// Asia/Calcutta
```


## Date time format

For more datetime display format please refer 
[Momentjs Docs](https://momentjs.com/docs/#/displaying/format)

---
_Source: https://npm.io/package/user-timezone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
