Nimrod Yanai
Nimrod Yanai
I do not believe this is an issue with documentation. I keep getting incorrect time-zone dates whatever code I use. I am trying to get the date in zone "America/Bogota",...
Here you go: ``` const convertDate = (date,format,zone) => { //var newDate = dayjs(date,format).tz(zone); var newDate = dayjs(date,format,zone); //newDate = newDate.$d.tz(zone,true); console.log(newDate); //var test = new Date(new Date (newDate).toLocaleString("es-CL", {timezone:zone}));...
Some confusion here. The format is the input format, which is DD-MMM-YY. I need the output in standard ISO. Based on your reply, I tried the following: `var newDate =...
That same documentation also says that if I am using anything other than ISO8601, I should use the string+format option, which is what I was trying to do. I have...
I tried converting the dates so that the format is DD-MM-YY as you suggested, but the result is always the same: ``` import customParseFormat from 'dayjs/plugin/customParseFormat.js'; dayjs.extend(customParseFormat); import utc from...
The reason I am using $d is that the object I get back from dayjs is not a date or even a string with the date. The date is inside...
That works! I'm a bit surprised it doesn't work when the format is DD-MMM-YY, I had to manually transform MMM to MM to get it to work. Any idea why...
> I suppose by > > > it doesn't work when the format is DD-MMM-YY > > you mean 'using `MMM` when parsing a string to a date'. > >...
Yes, thank you! That works great!
> I replaced that line with this, and it worked. > > ```js > log4js.addLayout('json', function(config) { > return function(logEvent) { return JSON.stringify(logEvent) + config.separator; } > }); > ```...