1.7.4 • Published 4 months ago

my-timezone v1.7.4

Weekly downloads
5
License
GPL-3.0
Repository
-
Last release
4 months ago

my-timezone License: GPL v3 npm version

Get the exact time based on your location by calculating the time difference in seconds from UTC (good explanation on CS4FN).

Prerequisites

Installation

ℹ️ This is a hybrid CommonJS / ESM module.

Add the module to your project with yarn add my-timezone or install it globally with yarn global add my-timezone.

Usage

TypeScript

import {MyTimezone} from 'my-timezone';

new MyTimezone()
  .getTimeByAddress('Berlin, Germany')
  .then(date => {
    console.log(date.toString()); // Sun Sep 03 2017 14:29:49 GMT+0200
  })
  .catch(error => console.error(error));

// or

new MyTimezone()
  .getTimeByLocation('13.394')
  .then(date => {
    console.log(date.toString()); // Sun Sep 03 2017 14:29:49 GMT+0200
  })
  .catch(error => console.error(error));

CLI

Usage: my-timezone [options] <location>

Get the exact time based on your location.
Use a city name or longitude value as location.

Options:

  -V, --version  output the version number
  -o, --offline  Work offline (default is false)
  -s, --server   Specify the NTP server (default is "pool.ntp.org")
  -h, --help     output usage information
1.6.3

8 months ago

1.7.4

4 months ago

1.7.3

4 months ago

1.7.2

7 months ago

1.7.1

7 months ago

1.7.0

7 months ago

1.6.2

10 months ago

1.6.1

11 months ago

1.6.0

11 months ago

1.5.5

11 months ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.9

2 years ago

1.4.10

2 years ago

1.4.8

2 years ago

1.4.7

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.0

3 years ago

0.8.1

4 years ago

0.8.0

5 years ago

0.7.0

6 years ago

0.5.3

6 years ago

0.6.0

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.2

6 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

8 years ago

0.0.3

8 years ago