Technology Insights

Macbook Pro Date and Time: Unable to Determine Current Location at this Time

I travel a lot and I have noticed that the timezone on my mac book wasn’t updating properly. I was getting lots of wrong meeting times in Outlook and various other apps that depend on time. I was getting pretty annoyed at this and decided to figure out what was up. I was pretty sure this was supposed to happen automatically so I decided to have a look and figure out what was going on.

Technology Errors

Type: Warning (2) Description: date(): It is not safe to rely on the system’s timezone settings

I recently upgraded a CentOS Linux servers PHP from 5.2.X to 5.3.X and ran into a couple minor issues along the way. One of the issues was the fact that one of my applications was complaining about PHP’s date function by letting me know that it could not rely on the system’s timezone setting. Fixing this problem is extremely easy and can most likely be resolved by a quick edit to the servers php.ini file as described in detail below.

Technology Insights

How to Modify the timestamp (Date and Time) of a File on Linux

There are certain circumstances where you may want to modify the date and time of a file on Linux. In my case I was testing a cronjob that moved and deleted files older than a certain date and testing it was much easier after modifying the date of the files.

The command to use for modifying the date and time of a file is called touch. To modify the timestamp of a file issue one of the below commands. The file used in each of the examples below is named testfile.