1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 13:35:56 +00:00

add automatic timezone (based on client tz offset)

This commit is contained in:
Andrew Dolgov
2013-04-26 10:31:57 +04:00
parent 5ddef5ba23
commit 6bfc97da86
5 changed files with 19 additions and 7 deletions

View File

@@ -962,8 +962,11 @@ function init() {
dojo.addOnLoad(function() {
loading_set_progress(50);
var clientTzOffset = new Date().getTimezoneOffset() * 60;
new Ajax.Request("backend.php", {
parameters: {op: "rpc", method: "sanityCheck"},
parameters: {op: "rpc", method: "sanityCheck",
clientTzOffset: clientTzOffset },
onComplete: function(transport) {
backend_sanity_check_callback(transport);
} });

View File

@@ -256,10 +256,12 @@ function init() {
var hasAudio = !!a.canPlayType;
var hasSandbox = "sandbox" in document.createElement("iframe");
var hasMp3 = !!(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
var clientTzOffset = new Date().getTimezoneOffset() * 60;
new Ajax.Request("backend.php", {
parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio,
hasMp3: hasMp3,
clientTzOffset: clientTzOffset,
hasSandbox: hasSandbox},
onComplete: function(transport) {
backend_sanity_check_callback(transport);