Retrieve the date from an external source.
matthias_livecode_150811 at m-r-d.de
Tue Nov 29 10:04:31 EST 2016
i am using Livecode Server for such tasks.
To get the correct date in an LC app i use
put URL “http://yourserver.com/whatsthetime.lc” into tCurrentDate
where yourserver.com is of course my server and whatsthetime.lc contains the following
put the short system time
put the system date
Before LC server i used a php script to get the current date in my Flash Advent calendar.
Tel +49 5741 310000
+49 160 5504462
Fax: +49 5741 310002
eMail: matthias at m-r-d.de <mailto:matthias at m-r-d.de>
BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
> Am 12.01.2017 um 15:58 schrieb Tore Nilsen <tore.nilsen at me.com>:
> I need to retrieve the date from an external source, in order to bypass any changes to the date settings on the users computer. This is to ensure that a user cannot start an event until the proper date. (A digital advent calendar) I was foolishly thinking that the internet date was what I was looking for, but it is just another way to format the internal date as set by the user. Therefore, getting the internet date does not bypass any changes to the machines local settings.
> Information about the proper date for each event is stored as a custom property of different images in the application. This property is in the form of localized date, and is converted to seconds for comparison with the actually date, which of course is also converted to seconds. Everything here works as expected, but changing the computers date settings will allow the user to override the restraints in the script. I therefore need to get the date from a source outside the control of the user. (The application is a desktop standalone.)
> I am in a bit of a hurry (deadline on Thursday this week) and I can not seem to find any solutions searching for it in the usual places. I am unfamiliar with retrieving data from servers and services, so I am unfortunately stuck at the moment. Any help will much appreciated.
> Tore Nilsen
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode