I imported the pulses correctly. It works fine, but when I try to import a point in time, I cannot get it to work. I do not have access to any functions.
Here is my aurelia.json file where I download them from npm:
{
"name": "moment",
"path": "../node_modules/moment",
"main": "moment",
"exports": "moment"
},
{
"name": "moment-timezone",
"path": "../node_modules/moment-timezone",
"main": "moment-timezone",
"deps": [ "moment" ],
"exports": "tz"
}
and here where I try to load them into a file:
import { autoinject } from "aurelia-framework";
import * as moment from "moment";
import * as tz from "moment-timezone";
@autoinject
export class GlobalUtil {
}
Is it right to load them? This does not work for me, unfortunately.
Now, when I try to specify the time zone, I get "Moment Timezone has no data for America / New_York". Then it is console.logs (7am), which does not correspond to the correct time.
James source
share