Giter Club home page Giter Club logo

walltime-js's Introduction

Deprecation Notice

Walltime is no longer actively maintained or supported. Please use another library (such as moment-timezone) instead.


walltime-js Build Status

Walltime-js is a JavaScript library for easily translating a UTC time to a "Wall Time" for a particular time zone.

Problems this solves

Dates in JavaScript do not properly account for daylight savings time for regions other than your own browser configured time zone.

For example:

  • Your API sends UTC times in JSON but you need to display them for Chicago time zone to a user viewing your page in Los Angeles.
  • What was the local time in Chicago when the first humans landed on the Moon?

Usage

Here is an example unit test showing how to use the WallTime API to get the local time in Chicago for the Moon landing.

<script src="/path/to/walltime-data.js"></script>
<script src="/path/to/walltime.js"></script>
<script type="text/javascript">
    it("can convert first moon landing time", function () {
        // Apollo 11 was the spaceflight that landed the first humans on the Moon,
        // Americans Neil Armstrong and Buzz Aldrin, on July 20, 1969, at 20:18 UTC.
        var landingTime = Date.UTC(1969, 6, 20, 20, 18, 0, 0),
            chicagoLandingTime = WallTime.UTCToWallTime(landingTime, "America/Chicago");
        
        chicagoLandingTime.getFullYear().should.equal(1969);
        chicagoLandingTime.getMonth().should.equal(6);
        chicagoLandingTime.getDate().should.equal(20);
        chicagoLandingTime.getHours().should.equal(15);
        chicagoLandingTime.getMinutes().should.equal(18);
    });
</script>

Using with RequireJS

<script type="text/javascript" src="require.js"></script>
<script type="text/javascript" src="path/to/walltime-data.js"></script>
<script type="text/javascript">
    require.config({
      paths: {
        walltime: 'path/to/walltime'
      }
    });

    define(['walltime'], function(WallTime){
      var someUTCDate = new Date(),
          chicagoWallTime = WallTime.UTCToWallTime(someUTCDate, "America/Chicago");
    });
</script>

Building Data

To limit the size of WallTime.js, you should only use the data for the time zone files you need.

By default, walltime-data.js contains northamerica, europe and australasia, which encompass most of the world, but is 479k (minified). By narrowing it down to just northamerica, you could save 300k. Adding gzip compression could get you down as low as 16k.

To get the latest Olson files

git submodule init && git submodule update

To build all the data for all the time zone files

grunt data

To build data for northamerica only

grunt data --filename=northamerica

To build data for northamerica and europe

grunt data --filename=northamerica,europe

To build data for America/Chicago only

grunt data --filename=northamerica --zonename=America/Chicago

To build individual data files for each time zone

grunt individual

# Optionally, pass a format parameter for naming
grunt individual --format "walltime-data_%s" # Becomes `walltime-data_America-Chicago.min.js`

By default the files are saved to ./client/walltime.js etc.

Development

This project uses Node.js and Grunt.

To get setup

# Clone the repo
git clone https://github.com/sproutsocial/walltime-js.git && cd walltime-js
# Install the dependencies
npm install

To run tests and lint source code

grunt test

To make new tests, create a new spec coffee file in the test directory.

MIT License

Copyright (c) 2013 Sprout Social, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

walltime-js's People

Contributors

adamhooper avatar cheddar avatar corydanielson avatar dansnetwork avatar geedew avatar jgable avatar soung3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

walltime-js's Issues

WallTime.toIsoString() should show the offset instead of Z

var dt = new Date(Date.UTC(2013, 5, 10, 0, 0, 0));
var wt = WallTime.UTCToWallTime(dt, "America/New_York");

console.log(dt.toISOString());  //  2013-06-10T00:00:00.000Z
console.log(wt.toISOString());  //  2013-06-09T20:00:00.000Z 

Since these represent the same moment, shouldn't the walltime output the offset instead of the Z?

I would expect: 2013-06-09T20:00:00.000-04:00

Test Compatibility with Moment.js

There is somewhat of a trend that favors smart libraries over dumb default implementations. WallTime certainly falls into that category. Thank you for your considerable efforts!

Another library that is often used in this space is Moment.js. They are solving a slightly different problem, focusing on parsing and formatting. They do have a side project for working with timezones, but it is not production ready, and has gotten relatively little attention.

It would be absolutely fantastic if WallTime and Moment could "play nice together". It probably will work, but there may be optimizations that can be done to make things easier. I'd love to see some unit tests specifically for this.

Aside - I'm giving a talk on DateTime fundamentals in a couple of months at Desert Code Camp in Phoenix, AZ. I'd love to feature a Moment/WallTime solution for the javascript parts. :)

WallTime calculation is not correct for Australia/Adelaide

For timezones where the beginning of the year is in DST, like Australia/Adelaide, the walltime is being calculated incorrectly.

We are assuming that the first rule of the year has no save to be applied.

I have an idea for a fix that will just check the last rule of the years save and apply it to times before the first rule. However, this will fail for years where the previous year had a different DST rule set being applied at the end of the year.

At any rate, I have a push coming to address this for 98.3% of the issue by just applying the last rule of the current year.

Create new WallTimeDate object to replace returned TimeZoneTime

Should inherit from native Date prototype ideally so that libraries that check for object type of Date are satisfied (looking at you jquery UI calendar).

Should probably encapsulate a TimeZoneTime but implement the setX functionality in such a way that the underlyingTimeZoneTime is recreated. This will keep our TimeZoneTime safe as an immutable object like I prefer and move the set functions into a higher level of abstraction (see issue #20 for discussion).

Implement WallTime.addRulesZones(rules,zones) method

There should be a method WallTime.addRulesZones(rules,zones) so that an application can append new rules/zones after init has taken place (lazy add). This method would be similar to WallTime.init(rules,zones), except that it would not initialize member properties and maybe it would even check that zone/rule does not exist before setting it. The init() method could also re-factor to call addRulesZones so that it is DRY.

America/Regina timezone data invalid

Running the following code in console:

WallTime.UTCToWallTime(new Date(), 'America/Regina').zone.name

Displays result "UTC".

It looks like something might be invalid in America/Regina zone data?

Make data loadable in Node

I see that walltime-js has been published to the npm repo, but after doing a npm install and a lot of trial and error trying to include the walltime data and library into an application, I wasn't able to get things working.

Is Node.js supported by walltime-js? If not, are there any plans to do so.

I would be interested in any ideas on how to get things working correctly on the node side as I would really like to share this awesome library between the client and server.

Example usage with Require.js

I've not been able to find a good example of how to make this lib work with require.

If the config looks like this:

require.config({
  paths: {
    walltime: 'bower_components/walltime/client/walltime'
  }
})

and the module looks like this:

define(['walltime'], function(WallTime){
  var someUTCDate = new Date(new Date().getTime()),
        chicagoWallTime = WallTime.UTCToWallTime(someUTCDate, "America/Chicago");
})

I get Uncaught Error: Must call init with rules and zones before setting time zone

I assume this has something to do with walltime-data not being loaded. But, when I add that as a dependency in the config I get the same result (I think this is because the data attached itself to window.WallTime and the WallTime module itself never sees it).

Sooooo, what actually needs to happen for this to work?

Broken in IE8 and IE9

Because of the use of indexOf on the MonthNames array in the helper.coffee, there is an error that breaks the library on IE8 and IE9.

omg how tf do i use this

this is way too confusing for me i installed it with npm and walltime-data module doesn't exist please help

Nuget Package

Hello! I just stumbled upon WallTime-js. I read your blog post and see that you encountered similar issues with timezone-js that I did.

I have been looking for a reliable replacement. I also stumbled upon bigeasy/timezone. Have you looked at this at all, and if so - how does it compare to WallTime?

Would you be so kind to post a package for WallTime-js on Nuget? And if not, do you mind if I do?

Thanks!

Sample code doesn't work (must run setTimeZone method first)

I've run cake data and created a test.html file in the root with this code:

<!doctype html>
<html>
<head>
<script src="client/walltime-data.js"></script>
<script src="client/walltime.js"></script>
<script type="text/javascript">
    var someUTCDate = new Date(new Date().getTime()),
        chicagoWallTime = WallTime.UTCToWallTime(someUTCDate, "America/Chicago");
</script>
</head>
</html>

When I load this page, I get a "Must set the time zone before converting times" error. Looking at the UTCToWallTime method, this test happens before setting the time zone to the zone passed in the argument:

if !@zoneSet
    throw new Error "Must set the time zone before converting times"

if zoneName != @timeZoneName
    @setTimeZone zoneName

The code works fine if I first use the setTimeZone method to set the time zone to any valid time zone so that it can pass that test.

Bug: TimeZoneTime.setHours does not update timezone offset for DST

Example:

dt = WallTime.UTCToWallTime(new Date('2013-03-10T01:00:00-0500'), 'America/New_York'); // before DST
console.log(dt.getTimezoneOffset()); // correctly prints 300
dt.setHours(3); // set to 3:00 AM, i.e., after DST
console.log(dt.getTimezoneOffset()); // incorrectly prints 300, but it should be 240

Client Side Library Tests with Phantom

We should try to replicate some base line client tests on the client side library. We already kind of have a requirejs file template, we'll just need to also create a regular non requirejs template and add some unit tests.

I'd like to use mocha for the client side tests as well, to make it a little easier to translate our tests to the client side.

The mocha-phantomjs module looks hopeful.

`cake individual` broken

I pulled just now and ran cake individual, and all the generated walltime-data[*].js files are identical, with empty objects for rules and zones. I last pulled at d9f33b1 (New client library and npm publish [ci skip]), which worked.

Allow passing format parameter for individual data file names

The build process generates Olson javascript files with a name format such as "walltime-data[Africa-Abidjan].min.js". Although the name format is nice and perfectly readable, not all web service platforms support file names with brackets in them (at least mine doesn't, i.e., Google App Engine). Perhaps you could rename these files to use a common denominator of supported file names, such as walltime-data-Africa-Abidjan.min.js?

Thanks!

P.S. Sorry for paper-cutting you to death with all these issues I've been opening!

TimeZoneTime setters

I'm interested in using walltime as a replacement for Date objects, to enhance other libraries. to that end, I've created several setter functions (and a toISOString function) for walltime.

I'm not very knowledgeable when it comes to github, but I'd like my work to have the potential to be useful for others; so:

  TimeZoneTime.prototype.toISOString = function()
  {
    return this.wallTime.toISOString();
  };

  // updates the UTC object, to match the walltime; should only be called internally (by the following functions); would like to be "private"
  TimeZoneTime.prototype.updateUTC = function()
  {
    this.utc = helpers.Time.WallTimeToUTC(this.offset, this.save, this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds(), this.getMilliseconds());
  };

  TimeZoneTime.prototype.setDate = function(d) {
    this.wallTime.setUTCDate(d);
    this.updateUTC();
    return this.wallTime.getTime();
  };

  TimeZoneTime.prototype.setTime = function(ms) {
    this.wallTime.setTime(ms);
    this.updateUTC();
    return this.wallTime.getTime();
  };

  TimeZoneTime.prototype.setMonth = function(m) {
    this.wallTime.setUTCMonth(m);
    this.updateUTC();
    return this.wallTime.getTime();
  };

  TimeZoneTime.prototype.setFullYear = function(y) {
    this.wallTime.setFullYear(y);
    this.updateUTC();
    return this.wallTime.getTime();
  };

  TimeZoneTime.prototype.setHours = function(h, mi, s, ms) {
    this.wallTime.setUTCHours(h, mi, s, ms);
    this.updateUTC();
    return this.wallTime.getTime();
  };

  TimeZoneTime.prototype.setMinutes = function(mi) {
    this.wallTime.setUTCMinutes(mi);
    this.updateUTC();
    return this.wallTime.getTime();
  };

  TimeZoneTime.prototype.setSeconds = function(s) {
    this.wallTime.setUTCSeconds(s);
    this.updateUTC();
    return this.wallTime.getTime();
  };

  TimeZoneTime.prototype.setMilliseconds = function(ms) {
    this.wallTime.setUTCMilliseconds(ms);
    this.updateUTC();
    return this.wallTime.getTime();
  };

Make a data file that can be loaded in node

Consumers of this library in node have trouble loading the data and have to resort to hacky workarounds.

We should create the large walltimeData and individual data files for loading by the library and put them in the lib/data/ folder. JavaScript will be fine instead of CoffeeScript since we already have the infrastructure to do that.

We should also figure out a way to have the node module pre-load the data when required so people don't have to.

WallTimeDate Helper

I can convert a Date to a WallTime:

var wt = WallTime.UTCToWallTime(dt, "America/New_York")

I can convert a WallTime to a Date:

var dt = WallTime.WallTimeToUTC('America/New_York', 2013, 10, 7, 0, 0, 0, 0)

But how can I just represent a simple wall time? I would expect something like:

var wt = new WallTime('America/New_York', 2013, 10, 7, 0, 0, 0, 0);

(perhaps with an optional offset for resolving ambiguous wall times)

I want to be able to then take that wall time, get the offset in effect, display it with the correct name or abbreviation, etc.

Linked timezones when generating data file

The timezones described in the olson files as linked to a principal timezone - such as Europe/Belgrade => Europe/Zagreb - are not being reflected in the generated files, and as such walltime throws an error when a zone like Euope/Zagreb is specified.

Not sure whether the data generation is incomplete or whether there is an alternative to this approach.

Africa/Casablanca timezone rules are out-of-date

For now you can manually replace your Africa/Casablanca data file with the code below.

The changes below have the rules from 2010-2019 manually changed to reflect this change to Moroccan timezone rules.
Rules after 2019 are probably incorrect, but do match the Moroccan rules.

(function(){"use strict";var e={rules:{Morocco:[{name:"Morocco",_from:"1939",_to:"only",type:"-","in":"Sep",on:"12",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"1939",_to:"only",type:"-","in":"Nov",on:"19",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"1940",_to:"only",type:"-","in":"Feb",on:"25",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"1945",_to:"only",type:"-","in":"Nov",on:"18",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"1950",_to:"only",type:"-","in":"Jun",on:"11",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"1950",_to:"only",type:"-","in":"Oct",on:"29",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"1967",_to:"only",type:"-","in":"Jun",on:"3",at:"12:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"1967",_to:"only",type:"-","in":"Oct",on:"1",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"1974",_to:"only",type:"-","in":"Jun",on:"24",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"1974",_to:"only",type:"-","in":"Sep",on:"1",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"1976",_to:"1977",type:"-","in":"May",on:"1",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"1976",_to:"only",type:"-","in":"Aug",on:"1",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"1977",_to:"only",type:"-","in":"Sep",on:"28",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"1978",_to:"only",type:"-","in":"Jun",on:"1",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"1978",_to:"only",type:"-","in":"Aug",on:"4",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2008",_to:"only",type:"-","in":"Jun",on:"1",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2008",_to:"only",type:"-","in":"Sep",on:"1",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2009",_to:"only",type:"-","in":"Jun",on:"1",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2009",_to:"only",type:"-","in":"Aug",on:"21",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2010",_to:"only",type:"-","in":"May",on:"2",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2010",_to:"only",type:"-","in":"Aug",on:"8",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2011",_to:"only",type:"-","in":"Apr",on:"3",at:"0:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2011",_to:"only",type:"-","in":"Jul",on:"31",at:"0:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2012",_to:"only",type:"-","in":"Apr",on:"29",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2012",_to:"only",type:"-","in":"Jul",on:"20",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2012",_to:"only",type:"-","in":"Aug",on:"20",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2012",_to:"only",type:"-","in":"Sep",on:"30",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2013",_to:"only",type:"-","in":"Apr",on:"28",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2013",_to:"only",type:"-","in":"Jul",on:"7",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2013",_to:"only",type:"-","in":"Aug",on:"10",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2013",_to:"only",type:"-","in":"Oct",on:"27",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2014",_to:"only",type:"-","in":"Mar",on:"lastSun",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2014",_to:"only",type:"-","in":"Jun",on:"28",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2014",_to:"only",type:"-","in":"Aug",on:"2",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2014",_to:"only",type:"-","in":"Oct",on:"lastSun",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2015",_to:"only",type:"-","in":"Mar",on:"lastSun",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2015",_to:"only",type:"-","in":"Jun",on:"14",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2015",_to:"only",type:"-","in":"Jul",on:"19",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2015",_to:"only",type:"-","in":"Oct",on:"lastSun",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2016",_to:"only",type:"-","in":"Mar",on:"lastSun",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2016",_to:"only",type:"-","in":"Jun",on:"5",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2016",_to:"only",type:"-","in":"Jul",on:"10",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2016",_to:"only",type:"-","in":"Oct",on:"lastSun",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2017",_to:"only",type:"-","in":"Mar",on:"lastSun",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2017",_to:"only",type:"-","in":"May",on:"27",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2017",_to:"only",type:"-","in":"Jul",on:"1",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2017",_to:"only",type:"-","in":"Oct",on:"lastSun",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2018",_to:"only",type:"-","in":"Mar",on:"lastSun",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2018",_to:"only",type:"-","in":"May",on:"12",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2018",_to:"only",type:"-","in":"Jun",on:"16",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2018",_to:"only",type:"-","in":"Oct",on:"lastSun",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2019",_to:"only",type:"-","in":"Mar",on:"lastSun",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2019",_to:"only",type:"-","in":"May",on:"4",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2019",_to:"only",type:"-","in":"Jun",on:"8",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2019",_to:"only",type:"-","in":"Oct",on:"lastSun",at:"3:00",_save:"0",letter:"-"},{name:"Morocco",_from:"2020",_to:"only",type:"-","in":"May",on:"24",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",from:"2021",_to:"only",type:"-","in":"May",on:"13",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2022",_to:"only",type:"-","in":"May",on:"3",at:"2:00",_save:"1:00",letter:"S"},{name:"Morocco",_from:"2023",_to:"max",type:"-","in":"Apr",on:"lastSun",at:"2:00",_save:"1:00",letter:"S"}]},zones:{"Africa/Casablanca":[{name:"Africa/Casablanca",_offset:"-0:30:20",_rule:"-",format:"LMT",_until:"1913 Oct 26"},{name:"Africa/Casablanca",_offset:"0:00",_rule:"Morocco",format:"WE%sT",_until:"1984 Mar 16"},{name:"Africa/Casablanca",_offset:"1:00",_rule:"-",format:"CET",_until:"1986"},{name:"Africa/Casablanca",_offset:"0:00",_rule:"Morocco",format:"WE%sT",_until:""}]}};typeof window=="undefined"?module.exports=e:typeof define!="undefined"?define("walltime-data",[],function(){return e}):(this.WallTime||(this.WallTime={}),this.WallTime.data=e,this.WallTime.autoinit=!0)}).call(this)

If this PR is merged into https://github.com/eggert/tz, you can fix this issue by rebuilding the Africa/Casablanca data file by following the instructions in the README.

Longer term fix would be to migrate your WallTime code to moment-timezone or another timezone library that is actively maintained.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.