Open Closed

moment to luxon #10365


0
mahendra created

Hi We were using version ASPNetZero Version 8.0 where moment library was being used. In that when evaluate new Date().toJSON() it was giving the output as 2021-06-03T14:31:55.575Z.

Now we upgraded ASPNetZero to version 10.3 where luxon library is being used. In this when evaluate new Date().toJSON() it gives the output as 2021-06-03T20:03:07.373+05:30.

While debuging why such difference in the output we observed that in version 10.3 in AppPreBootstrap.ts file in configureLuxon function the toISOString and toString function has been overwritten.

While we see our 8.0 version the toJSON and toISOString function of moment has been overwritten that too in the else part of the following if condition: **if (abp.clock.provider.supportsMultipleTimezone) **

whereas in version 10.0 I don't see any else condition.

Could you verify and confirm if the code inside configureLuxon function of AppPreBootstrap.ts file is correct. or there is a mistake of else condition and it should be there.

Regartds, Mahendra


1 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @mahendra

    Yes, the code in configureLuxon is placed on purpose and there is no else condition there. Basically 2021-06-03T14:31:55.575Z and 2021-06-03T20:03:07.373+05:30 are the same values.

    Could you explain what kind of problem does this case for you ?

    Thanks