Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived Development & Programming
Getting current time in military time.
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
Getting current time in military time.
El Forum
Guest
#1
08-28-2007, 10:54 AM
[eluser]codelearn[/eluser]
Does anyone know how to get the current time in military time? Is there a PHP date function for that?
Thanks.
El Forum
Guest
#2
08-28-2007, 11:26 AM
[eluser]Michael Wales[/eluser]
Code:
<?= date('Hi'); ?>
El Forum
Guest
#3
08-28-2007, 11:30 AM
[eluser]codelearn[/eluser]
[quote author="walesmd" date="1188340014"]
Code:
<?= date('Hi'); ?>
[/quote]
Thank you, thank you!
El Forum
Guest
#4
08-31-2007, 02:35 PM
[eluser]codelearn[/eluser]
I can't seem to figure out if 12am is 0000 or 2400. No documentation on this is anywhere I can find.
El Forum
Guest
#5
08-31-2007, 03:04 PM
[eluser]Nicholas Helke[/eluser]
[quote author="codelearn" date="1188610551"]I can't seem to figure out if 12am is 0000 or 2400. No documentation on this is anywhere I can find.[/quote]
I believe in the military it is 0000.
El Forum
Guest
#6
08-31-2007, 03:07 PM
[eluser]codelearn[/eluser]
I believe so too, but PHP is only recognizing 2400. Can't think of a way to check.
El Forum
Guest
#7
09-01-2007, 12:12 AM
[eluser]Michael Wales[/eluser]
Midnight is 0000 (I'm in the military).
You could always do an if/statement on the returned value, to change it.
Code:
if ($time == '2400') {
$time = '0000';
}
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB