I have an Android app that needs to grant an in-app purchase benefit for 7 calendar days.
I have been able to calculate the difference in days and determine whether or not to grant the benefit.
However, I have not taken into consideration the internationalization of time.
I compute the extra 7 calendar days on a server via a hosting service. (I assume that wherever the user is that pins the server the call will go to the nearest server. So, I have a need for internationalized time!)
The server code that computes the extra 7 calendar days is as such:
$today = date_create();
date_modify($today,"+7 days");
$modified_date = date_format($today,"m/d/y"); //I see a big problem here with m/d/y format
echo "{$modified_date}";
From, the code above I can see that the format m/d/y will not work in European countries, since they use the d/m/y format!
How does this code adapt to where the server location is? Will the creation of the variable $today be Localized automatically or should I add something to it?