Apple & Android vs Spark Ar Help

Hi guys,

I made an instagram filter. It is finished, but now im experiencing the following issue:

Iphone

Samsung galaxy s20 ultra:

Note that the dates are different and also a weird yellow colored border. How can I fix this?
The filter on the Iphone is the right one.
I also want the date like this: DD/MM/YYY

Test link: https://www.instagram.com/ar/647387032628746/?ch=MzU2ZDRmYmYwZmNlNDA2YWY1ODk4NDdjY2NmNjQxMjY%3D

I think the date API might try to format the date based on locality, and I think that feature is broken on Android.

But… if you want to ignore locality since it’s not working consistently, you can use script to get the date.

d.getDate() + '/' + (d.getMonth() + 1) + '/' + (d.getYear()+1900)

1 Like

Thanks! Can you maybe show me how to implement this code in the script? I’m such a noob at coding. :’(

For sure - it’s not much. You just need to send that value to patches, like this:

const Patches = require('Patches')
const d = new Date()
const date = d.getDate() + '/' + (d.getMonth() + 1) + '/' + (d.getYear()+1900)
Patches.inputs.setString('date', date)

Then you would add “date” to the script object’s “from script” section (select it in the assets panel and it will show in the properties). Then access it by dragging the script object into the patch editor

Thanks again! It worked!