Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Drupal 5 Views Recipes

You're reading from   Drupal 5 Views Recipes 94 recipes to develop custom content displays for your Drupal web site

Arrow left icon
Product type Paperback
Published in May 2009
Publisher Packt
ISBN-13 9781847196965
Length 412 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Table of Contents (22) Chapters Close

Drupal 5 Views Recipes
Credits
About the Author
Acknowledgement
About the Reviewer
Preface
1. Introduction to Views FREE CHAPTER 2. Working with Default Views 3. CCK and Views 4. Dates and Calendars 5. Views and Tools for Administrators 6. Views Galore 7. Theming and Layout 8. Navigating the Online Drupal Community Default Views in Drupal 5 Modules
Formatters
Style Plugins
Views Hooks for Coders
Modules Included in Recipe Ingredients
Additional Resources and Modules Mentioned in Recipes
Selected Noteworthy Patches to Views
Index

Recipe 33: Understanding Date formats


Drupal dates are typically stored in one of two ways. Core Drupal dates—including Node: Created Time, and Node: Updated Time—are stored as Unix timestamps. Contributed module date fields can be stored as either a timestamp or a format known as ISO. Neither style is particularly friendly to human readers, so both field types are usually formatted before users see them. This recipe offers a tour of places in Drupal where dates can be formatted and information on how to customize the formats.

Tip

What's that Lucky Day?

The Unix timestamp 1234567890 fell on Friday the 13th, in February, 2009. This timestamp marks 1,234,567,890 seconds since January 1, 1970. The same date/time combination would be stored in a date field in ISO format as 2009-02-13T23:31:30+00:0. ISO is an abbreviation for the International Organization for Standardization.

  1. Opening the browser windows side-by-side will help you understand date formatting. In the left window, open YOURSITE.com...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image