Skip to content

DateFormatter setUseTimezoneManager

MarkusWME edited this page May 21, 2016 · 2 revisions

setUseTimezoneManager

DateFormatter - setUseTimezoneManager

Description

void setUseTimezoneManager(boolean use [, function callback])

Tells the DateFormatter if it should use a TimezoneManager or not. If not the system timezone settings will be used, but exact geolocation timezone strings won't work.

Parameters

Parameter Description
use A boolean value that tells the DateFormatter if it should use a TimezoneManager (true) or not (false).
callback A optional callback that should be executed after the geolocation has been tracked. Therefore the getCurrentPosition function of the TimezoneManager object would be used.

Return value

This function doesn't return a value.

Errors/Exceptions

This function doesn't throw any exception.

Examples

var dateFormatter = new DateFormatter();
dateFormatter.setUseTimezoneManager(false);

This will tell the DateFormatter that no TimezoneManager should be used.

var dateFormatter = new DateFormatter();
dateFormatter.setUseTimezoneManager(true, function() {
    console.log(Geolocation tracked);
});

This will print the following output when the geolocation has been tracked:

Geolocation tracked

Clone this wiki locally