Tip of the Day

June 19th, 2013

I’ve only ever used Date.today and Time.now to get the current date and time. But for those of us concerned with global timezones (and who isn’t), we should really be using the .current method.

Date.current is a rails core extension that gets the current date in the set time zone.

Awesomesauce.

Entry Filed under: Professional,Ruby on Rails

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Pages

Tweets

Today is my last day at the MBTA. So proud to have served Boston alongside my amazing team at CTD. I’m joining Indigo Ag to help farmers sustainably feed the planet, but before I go I wrote up a thing about what we’ve done on MBTA.com. bit.ly/2kjr15O pic.twitter.com/r4acHkz78j

About 3 months ago from Liana Leahy's Twitter via Twitter Web App

Meta