LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices



- - - - - As of February 1st 2014 this blog is no longer updated - - - - -
Old

Date and time functions

Posted 12-09-2013 at 12:34 PM by druuna
Updated 01-31-2014 at 04:25 AM by druuna (Small changes to layout)
Tags date, seconds, time

A handful of date and time related functions that might come in handy.
  • Convert a date or time string to seconds from epoch
PHP Code:
# ------------------------------------------------------------------ #
# Function : dateToSecs
# Syntax   : dateToSecs "[date]"
# Convert a date or time string to seconds from epoch.
# ------------------------------------------------------------------ #
function dateToSecs() {
  [[ $
# -eq 0 ]] && date --utc 
...
LQ Veteran
Posted in General
Views 440 Comments 0 druuna is offline

  



All times are GMT -5. The time now is 01:38 AM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration