• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. B2G OS APIs
  5. MozTimeManager
  6. MozTimeManager.set()

MozTimeManager.set()

In This Article
  1. Summary
  2. Syntax
    1. Parameters
  3. Specification
  4. See also

This API is available on Firefox OS for internal applications only.

Summary

The set method is used to change the system time.

Note: To change the timezone of the system, it's required to use the Settings API.

Syntax

navigator.mozTime.set(time);

Parameters

time
The new time to set. It can be either a Date object or a number. If a number is provided, it represents the number of millisconds since midnight UTC January 1, 1970.

Specification

Not part of any specification.

See also

  • MozTimeManager
  • Time and Clock

Document Tags and Contributors

Tags: 
  • API
  • B2G
  • Firefox OS
  • Method
  • Non-standard
  • Time
 Contributors to this page: chrisdavidmills, fscholz, kscarfone, Prachi_Dighe, justinpotts, Jeremie
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:07:32 AM
See also
  1. Time and Clock API
  2. Archive
  3. Events
    1. moztimechange
  4. Related pages for Time and Clock API
    1. MozTimeManager
    2. Navigator.mozTime