mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-422: Implement client-side timezone detection.
This commit is contained in:
committed by
Virtually Nick
parent
8b443dc9d5
commit
ea913c98fe
@@ -98,6 +98,17 @@ angular.module('settings').provider('preferenceService', ['$injector',
|
||||
return language.replace(/-/g, '_');
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the timezone detected for the current browser session
|
||||
* by the JSTZ timezone library.
|
||||
*
|
||||
* @returns String
|
||||
* The name of the currently-detected timezone.
|
||||
*/
|
||||
var getDetectedTimezone = function getDetectedTimezone() {
|
||||
return jstz.determine().name();
|
||||
};
|
||||
|
||||
/**
|
||||
* All currently-set preferences, as name/value pairs. Each property name
|
||||
@@ -128,7 +139,13 @@ angular.module('settings').provider('preferenceService', ['$injector',
|
||||
*
|
||||
* @type String
|
||||
*/
|
||||
language : getDefaultLanguageKey()
|
||||
language : getDefaultLanguageKey(),
|
||||
|
||||
/**
|
||||
* The timezone set by the uesr.
|
||||
* @type String
|
||||
*/
|
||||
timezone : getDetectedTimezone()
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user