Erik Saline Posted April 20, 2006 Posted April 20, 2006 We seem to run into a bit of problems with Date and Times. We use calculations to determine the time a job has spent in our plants. It is a simple calculation. Plant Out Date - Plant In Date. This also affects our SQL upload because the records are found by the last time uploading was ran and the record modification date/time. However when power goes out at a plant the clocks for the computer get set to the Mac 1/1/1907 time. We thought we could correct the issue by setting all the Clocks to Set Automatically in System Prefences. It does great so far. However it seems that it takes a while for the clock to realize the date is wrong and then correct itself. A few records are created with the wrong date. Using Apple Script I was able to write. set t to (do shell script "curl http://www.timeanddate.com/worldclock/city.html?n=137") set tid to text item delimiters set text item delimiters to "Current time" set ht to text item 2 of t set text item delimiters to tid tell ht to set tm to word 11 tell ht to set td to word 12 tell ht to set ty to word 13 if tm = "April" then set tn to "4" & "/" & td & "/" & ty else if tm = "January" then set tn to "1" & "/" & td & "/" & ty else if tm = "February" then set tn to "2" & "/" & td & "/" & ty else if tm = "March" then set tn to "3" & "/" & td & "/" & ty else if tm = "May" then set tn to "5" & "/" & td & "/" & ty else if tm = "June" then set tn to "6" & "/" & td & "/" & ty else if tm = "July" then set tn to "7" & "/" & td & "/" & ty else if tm = "August" then set tn to "8" & "/" & td & "/" & ty else if tm = "September" then set tn to "9" & "/" & td & "/" & ty else if tm = "October" then set tn to "10" & "/" & td & "/" & ty else if tm = "November" then set tn to "11" & "/" & td & "/" & ty else if tm = "December" then set tn to "12" & "/" & td & "/" & ty end if tell application "FileMaker Pro" tell database "Login" set cell "Global Text 1" to tn end tell end tell Filemaker then compares the Status Current Time to Global Text 1 time. If it is off it shows a message about time problems. Does anybody have any other ideas and how do you deal with any Windows computers?
Recommended Posts
This topic is 6790 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now