Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

[CUSTOM] PHPFusion Time/Date Settings

Locked Asked Modified Viewed 5,168 times
W
Whitey
W
Whitey 10
  • Junior Member, joined since
  • Contributed 37 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
asked
Junior Member

I could not think of a better place to fit this but this forum, so I will let it here.


If 24 hour (military) time has ever annoyed you, or that the day of the week did not show, I am here to answer your questions.

The article on http://www.php.net does not follow the same functions as PHPFusions time settings.

Below, are a list of some I have made in an article on my site I will copy over but not format.
If you wish to see the formatted version with some examples, you can check it out here: http://whiteyslair.com/articles.php?article_id=1
(Note that my site is under heavy construction. You will see things come and go, but if you wish to register, sobeit.)

Good luck!

Month


%B - Displays the month in full format. e.g. March, April, etc.
%b - Displays the month in short format. e.g. Mar, Apr, etc.
%m - Displays the numerical month with beginning 0's. e.g. 01, 02, etc.


Day


%A - Displays the day of the week in full format. e.g. Saturday, Sunday, etc.
%a - Displays the day of the week in short format. e.g. Sat, Sun, etc.
%d - Displays the numerical day of the week with a beginning 0. e.g. 01, 02, 03..28, 29, 30, etc.
%D - Displays the numerical day of the week with beginning 0's in full format. e.g. 01/01/14


Year


%Y - Displays the year in full format. e.g. 2014, 2015, etc.
%y - Displays the year in short format. e.g. 14, 15, etc.


Hours


%I - Displays the 12hour-hour with beginning 0's. e.g.. 12, 01, 02, etc.
%e - Displays the 12hour-hour with NO beginning 0's. e.g.. 12, 1, 2, etc.
%H - Displays the 24hour-hour. e.g. 00, 01, etc.


Minutes


%M - Displays the minutes in numerical format. e.g. 01, 02, etc.
(This is the only way to display minutes. There's literally no other way; that's be pretty silly otherwise.)


Seconds


%S - Displays the seconds in numerical format. e.g. 01, 02, etc.
(This is the only way to display seconds. There's literally no other way; that's be pretty silly otherwise.)

Additions


%p - Displays whether it is AM or PM in capitals.
%P - Displays whether it is Am or Pm with shifted initials.
%Z - Displays timezone in letter format. e.g. EST, PST, etc.
%z - Displays timezone in numerical format. e.g. -0500, -0300, etc.

Shortcodes


%r - Displays time in full 12hour format. e.g. 01:25:02 AM
%R - Displays time in full 24hour format, with NO seconds. e.g. 00:25 (I believe so, anyway.)
%T - Displays time in full 24hour format, WITH seconds. e.g. 00:25:59 (I believe so, anyway.)
%D or %x - Displays date in full two-digit numerical format. e.g. 01/01/14
%F - Displays date in full, backwards numerical format. e.g. 2014-01-01
%c - Displays date and time, in short format, with full year. e.g. Sat Mar 1 01:25:00 2014
0 replies

9 posts

H
Homdax
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,246 posts on the community forums.
  • Started 108 threads in the forums
answered
Fusioneer

So what are the discrepancies you say exist in PHPFusion?
0 replies
W
Whitey
W
Whitey 10
  • Junior Member, joined since
  • Contributed 37 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

Richard Ainz wrote:

So what are the discrepancies you say exist in PHPFusion?


When did I ever mention a "discrepancy" within the PHPFusion CMS?
Accept my sincere apologies in trying to assist everyone in trying to customize their website with the correct information.

http://us2.php.net/manual/en/function.date.php
I am going to have to take into account that the above is based off an outdated documentation, because almost 70% of the items on that page either
[olist=1]Do not work
Have incorrect descriptions and results[/olist]

Do tell me where the word "discrepancies" and "PHPFusion" ever met in the same sentence; and I will be more than glad to allow you to intrigue me with further assumptions. I spent too much time figuring out what each function did and writing it down, and for you to sit here and act belligerent about my findings is egotistical.
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

H
Homdax
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,246 posts on the community forums.
  • Started 108 threads in the forums
answered
Fusioneer

Well you said it did not follow the same functions, that is the just another word for discrepancies but I get your explanation.
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

@Whitey Thank you for making the effort to make this.

Quote


I am going to have to take into account that the above is based off an outdated documentation, because almost 70% of the items on that page either

Do not work
Have incorrect descriptions and results


Domi and I discovered this thread few hours ago. We discussed. I was to check. I am yet to check on this. I did a simple test to showdate() and date(). Yes they have discrepancies.

In my code:

".date("M d, Y", time())."<span>".date("D h:m a", time())."


and


".showdate("%M %d, %Y", time())."<span>".showdate("%D %h:%m %a", time())."


Both produce different results. It will be in my todo to look into showdate soon. It is not that showdate is badly coded. No, it's an issue of standardization if I get your point correctly Whitey. I will consolidate it once again using your reference.
0 replies
P
PeaceLaced
P
PHP-Fusion MAIN Support Team
PHP-Fusion USA NSS Admin
  • Member, joined since
  • Contributed 154 posts on the community forums.
  • Started 23 threads in the forums
answered
Member

@Whitey, thank you for this excellent post. I ran into the same issue this weekend working on a project. I found this link that may be useful to everyone. PHPFusion Date/Time Usage. It seems to be a guide written by Netrix posted over two years ago.

@hien, PERSONALLY, I do not think they should be the same as PHP.net, and here is why. I know for a fact that Nick Jones knew the differences being discussed here, leading me to believe he coded the DISCREPANCIES on purpose. My speculation is that he knew people would be using PHPFusion to learn how to program, thus he created a UNIQUE environment. It is no different than him creating unique database call functions, or unique security features, or whatever. The time and date usage is UNIQUE to this environment.

Also, having known Nick about ten years ago, and having worked with him on a few of his development projects, I know that he knew the importance of change when learning something new, as in, if things never change, learning ceases to exist. This situation of the date/time function being different should be recognized not as "an issue of standardization", but as an opportunity to expand ones knowledge by seeing a part of programming, and PHPFusion, from a different perspective. If we honestly break it down, can we not say that is what makes a programmer a programmer, the ability to see things from perspectives that others do not. The DISCREPANCIES he created reinforce this shift in perspective.

@richard, It interests me HIGHLY that a person who owns not ONE, not TWO, not THREE, but FOUR php-fusion sites, one of which is a NSS, does not know about the DISCREPANCIES between PHPFusion and the normal PHP date and time functions. If you're going to flaunt, you should at least get a clue as to what your flaunting.
Edited by PeaceLaced on 04-03-2014 14:52,
0 replies
H
Homdax
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,246 posts on the community forums.
  • Started 108 threads in the forums
answered
Fusioneer

Quote

@richard, It interests me HIGHLY that a person who owns not ONE, not TWO, not THREE, but FOUR php-fusion sites, one of which is a NSS, does not know about the DISCREPANCIES between PHPFusion and the normal PHP date and time functions. If you're going to flaunt, you should at least get a clue as to what your flaunting.


I own many more sites than that. It is very simple, never had reason to look in to it until very recently. Always used standard settings or modified as possible in the interface. I am NOT a coder or developer in the general sense of the word, never claimed to be and I mostly use PHPFusion out of the box with few changes or additions but for Themes.
Edited by N/A on 04-03-2014 16:44,
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

@Brandon. We come from and will still remain with simplicity. That is promised. Our job at dev is to extend the feature or reconsolidate flaws while maintaining backwards compatibility. Rest assured I am not changing our perspective rather than looking into these discrepancies aforesaid and implement everything we have based on Guides/issues/ (Netrix or Whiteys) in said issue if possible in a manner derive out of most logical sense, thorough discussions, experiment, testing, feedback. I did rolled back a few roadmap even I completed myself. So don't panic. I'm not applying A fix if there is no flaw. If I apply something that sets all infusions incompatible, let's not discuss this, that's not gonna happen under my watch.

Well, it is interesting to see how we can perceive things. Let's not make judgement about people here guys. Richard were to in fact enquirer as to the issue the way word was put up. discrepancies means "difference" . To me it doesn't carry weight at least.. And difference, Yes, according to my initial test....as I just mere echo and will report back when I find the reason "why" and "how" when I study them. I am about to.. Maybe tomorrow when I do I probably can give Richard the answer how.

Guys, We are suppose to answer if someone doesn't understand. It has really nothing to do whether one owns more than one website. The issue is still date and time here.. Stick to it. Lol.
We are not. Nick. But he is a brilliant coder. We aim to surpass, together. So thanks Brandon, I agree. Nevertheless, my judgement is still going to be based on how we do things from the dev protocol.. Change without repercussion , and for the better result.

I appreciate the tolerances guys, and good feedback.
Edited by Chan on 04-03-2014 16:00,
0 replies
F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

The initial answer by Polarfox is correct.

The inputs are parsed by the strftime function and not time / mktime nor date.

Merged on Mar 04 2014 at 17:57:15:
For further information we have this as a sticky here :
http://www.php-fusion.co.uk/forum/vie...d_id=27996

Due to that fact this thread will be [ LOCKED ]
Edited by N/A on 04-03-2014 19:57,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 9 posts
  • Votes 0 votes
  • Topic users 6 members

6 participants

F
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
P
P
PHP-Fusion MAIN Support Team
PHP-Fusion USA NSS Admin
  • Member, joined since
  • Contributed 154 posts on the community forums.
  • Started 23 threads in the forums
H
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,246 posts on the community forums.
  • Started 108 threads in the forums
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
W
W
Whitey 10
  • Junior Member, joined since
  • Contributed 37 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet