Results 51 to 64 of 64
-
08-20-2006, 10:42 PM #51Web Hosting Master
- Join Date
- Nov 2003
- Posts
- 691
Your "timestamp" only has the date, month, and year. There's no hours, minutes, or seconds so your script can't decide any more accurately than that whether its the 19th or 20th. You'll need to decide what values to use for the hour and minute if you want it to be more precise than that.
-
08-20-2006, 11:17 PM #52Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
Marvelous. You're absolutely right. I knew someone would be able to discover the truth about this function. Very well, thanks very much for your assistance on this.
-
08-20-2006, 11:36 PM #53Web Hosting Master
- Join Date
- Nov 2003
- Posts
- 691
No problem
-
08-21-2006, 01:46 AM #54Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
I knew someone would be able to discover the truth about this function.
1. You don't know the difference between a timestamp and a date field. I suggest you read up on this.
2. Do not assume anything about a database or a function. Just because you "see" something is not empty in a table, doesn't mean that it is going to be that way in your code. You might see 2006-08-20, and it looks like a date, but it may be stored as a string.
3. When people ask for something, instead of ignoring them, oblige them with what they ask. There is a reason why they are asking, because they believe (rightly so) that it is the source of the problem, instead of assuming you know the cause.
To be honest, I'm surprised people actually stuck out this long. With your attitude, I wouldn't even have posted past the first page. You should really be grateful.
-
08-21-2006, 08:41 AM #55Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
I really don't see the point of this argument, since this matter has been resolved. If it has taken three pages to resolved it, it's because the solution wasn't discovered until the end of this page.
1. I may not know the difference the timestamp and the date field, since I didn't built this date function all by myself.
2. Do not assume anything about a database or a function. Just because you "see" something is not empty in a table, doesn't mean that it is going to be that way in your code. You might see 2006-08-20, and it looks like a date, but it may be stored as a string.
3. When people ask for something, instead of ignoring them, oblige them with what they ask. There is a reason why they are asking, because they believe (rightly so) that it is the source of the problem, instead of assuming you know the cause.
To be honest, I'm surprised people actually stuck out this long.
With your attitude, I wouldn't even have posted past the first page.
You should really be grateful.
Please keep your critisism for yourself next time since, from this page, I thanked brendandonhu for his help on this matter. If this isn't satisfactory enough for you, then - please - don't post.
Thanks for your understanding.
-
08-21-2006, 09:44 AM #56Web Hosting Evangelist
- Join Date
- Apr 2005
- Posts
- 522
horizon, fyrestrtr was right. It took 3 pages for you to finally tell us what's stored in your table (2006-08-20).
Ok, it's one thing if you are not familliar with terms like timestamp, string, integer, null etc., it's perfectly understandable. But it's completely another thing when you ignore people who are trying to help you and who are asking you for some feedback from your side.
Yes, the matter is resolved because brendanhou has nerves of steel, I personally didn't want to help you any further. Every person in this topic knew what the problem was, it was just your attitude and stubbornes that delayed the solution and that's all. And this problem was so trivial, it's just amazing that it took 3 pages..
You took the criticism from fyrestrtr in the wrong way, which is a bit sad since his intention wasn't to flame you but to instruct you on how to help people to help you and how to act as a community member.
And in the end, there was nothing wrong with the function. Your function worked great from the start. You were passing wrong things to the function. It's like trying to make a pizza with a brick and blaming the stowe for not making the meal properly.
-
08-21-2006, 09:49 AM #57Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
Without wanting to argu further on this, it took three pages since the solution wasn't found until now. It works great and I'm grateful for it. Point made.
-
08-21-2006, 10:04 AM #58Web Hosting Evangelist
- Join Date
- Apr 2005
- Posts
- 522
I just can't help it - solution to your problem wasn't "found", people were trying to EXPLAIN to you that you're not giving enough input. I am sorry for not knowing japanese or other languages as it seems that you do not understand what I am trying to say. Anyway, it's great that your "problem" is solved, but be more considerate in the future. Thank YOU for understanding. Good luck with further development.
-
08-21-2006, 12:53 PM #59Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
Dude, don't take it wrong there - but if you take a look at your latest posted solution - which was this one:
http://www.webhostingtalk.com/showpo...2&postcount=40
your technical advise was that there were no more solution when there was one. Since brendandonhu shorted it up under two single posts, it would seem that it was your last inputs that didn't helped out, as it made prolongation to this topic.
Meaning, if you did not know how to, first, post a technical solution, then - please - don't post it at all and let other experienced users to post their modifications the way it should be correctly handled (especially when it comes from a faulty function issue).
To conclude, if this topic contained more than three pages, you should notice that other users added their inputs, regardless this subject, which made a prolongation of these posts.
With that all said, the final response was posted on two solutions, which was posted by: brendandonhu, and it works - period.
Again, thanks for your understanding on this matter since posters should not be critisized over technical methods that are officially working (or close).
-
08-21-2006, 01:16 PM #60Web Hosting Evangelist
- Join Date
- Apr 2005
- Posts
- 522
I take it that you also require a lesson in something called sarcasm
I've dealt with enough children in my life and I see no point in further communicating with you, "dude".
Thanks for your understanding, you are free to read the article found at the address posted above.
Best of luck in further development.
-
08-22-2006, 07:45 AM #61Web Hosting Guru
- Join Date
- Oct 2004
- Location
- Brisbane, Australia
- Posts
- 259
if you are storing the timezone offset as a string, then try:
PHP Code:$offset = '+5';
echo date ( 'Ymd H:i:s', strtotime ( $offset . ' hours' ) );
-
08-22-2006, 08:43 AM #62Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
Sorry. Can't be done this way since I'm using SQL date and time fields for timestamp.
-
08-30-2006, 04:39 PM #63Junior Guru Wannabe
- Join Date
- Aug 2006
- Posts
- 60
very own
when PHP has its own calender why should'not you use them ?
the playing with a lot of own functions indulge us in jargon .
-
08-30-2006, 05:01 PM #64Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
when PHP has its own calender why should'not you use them ?