Wappler Version : 4.0.1
Operating System : Mobile iOS Safari and Chrome, desktop Chrome and Edge
Server Model: PHP
Database Type: mySQL
Hosting Type: PHP
Hi @Teodor, I checked with just the value {{scheduled_on}} and yes it does display. @bpj, I added the .replace(‘Z’,’’) and it doesn’t make a difference.
Could you also output TZdiff.value on desktop and mobile. It looks like the addMinutes parameter gets an invalid parameter on mobile which causes the strange output. Will update the formatters to ignore invalid parameters and have them output an warning in the console instead.
Hi @patrick, you found the problem!
TZdiff.value shows as a number (ex “120”) on desktop, but as “NaN” on mobile, so the formatters can’t calculate right obviously
So that’s the root. How do I avoid this on mobile? I have no idea how the same Wappler code or value would appear differently on various browsers…
@Teodor@patrick
TZdiff is the time difference in minutes between 2 timezones. It’s calculated 2 ways depending if the timezone is positive or negative (we had another discussion on that ) but as you see below is already calculated with .toNumber
TZdiff = the code below
Then some of the variables used in this formula has some issues.
What is TZsplit? Where its value comes from?
Does it return any value actually on the phone?
Just start debugging value by value to see which one causes the issue.
Continuing on this, it’s not even the formatters which are the issue. No value from an external API is displayed (Microsoft VirtualEarth, used to get timezone name and time)
In the example below, “Europe/Paris” is passed to VirtualEarth which returns the Name of the Timezone (CEST) and the TimeOffset from UTC (2:00 hours). Both values are not received/displayed on mobile.
Is this Microsoft, or Wappler, or the mobile browser not managing the Wappler code correctly?
Below is the external API call, to which I pass the City to get an object of info back from it.
Coming back to this, would you have ideas as to why the values that the API (virtualearth in this case) are showing on desktop and not on mobile? These are direct values, none are calculated.
Desktop: timezone name (CEST) and TimeOffsetFromUTC (2:00) are displayed.
Mobile: same values are not being displayed.