« first day (1750 days earlier)      last day (3201 days later) » 

12:00 PM
@Sherif aha, I see, alright, I well more read about it, thanks for links
 
@Sajad timestamps are used for saving the exact time when something was created in your system
 
Anonymous
@Sajad is 1394 year?
 
@samaYo yes
@tereško It saves as Gregorian, I want to save as Solar
 
actually, timestamps contain a number of seconds since 1970/1/1 (gregorian), which is "beginning of time in Unix"
 
@Sajad You still seem confused. First of all, it's not Gregorian, nor is what you're referring to Solar. You're using an Iranian Calendar. That's not even a Solar calendar. Secondly, remember that storage and format are two independent concepts.
 
Anonymous
12:02 PM
 
@Sajad time now in timestamp is something like 1438430643
 
@tereško wrong ! I tested it ! wait I will show you a shotscreen
 
:)
<?php echo time();
 
I want convert that to solar, that is possible ?
 
Once again, the tool that makes you dumb is not a good tool to learn from.
 
12:05 PM
Stop using the word solar
It doesn't mean what you think it does
 
Anonymous
so now we have two solar systems
 
I fear I will not live long enough to see "Star Date" becomming a time counting system
SELECT OrderId, UNIX_TIMESTAMP(OrderDate) FROM Orders;
 
@PeeHaa how do you know? Solar time is useful for some people
 
also, @Sajad do you know what AUTO_INCREMENT is ?
 
really I don't know what should I say :) never mind, I will create a function for changing ` 2015-08-01 to 1394-5-10
@tereško yes! it is for ID !
 
12:08 PM
@Andrea ?
 
then why are you not using it?
 
@tereško You never know. You could get rich before you die and they come up with a cryogenic way to freeze your brain until such time that they can upload your consciousness into a machine then bring you back in the year 2532.
 
@Sajad I don't think you want to store solar time in your database
 
Oh wait... that's Vanilla Sky
 
@tereško that was just a test. I use it ever !
@Andrea why ?! I want that exactly
 
12:09 PM
Store normal UTC timestamps, they're easier to manipulate
You can convert to solar time when you take the data out of the database
 
@Andrea My country is based on Solar date
 
which is what we have been telling him for past hour or two
 
@Sajad Many of them are
 
@Sajad Because you keep interleaving the concept of storage with the concept of format and or transport
 
@Sajad Yes, but it's not easy for computers to work with
 
12:10 PM
Having them independent of one another is a good thing.
 
And your database is not your output, it's just a storage mechanism
 
@Sherif ok, If you say that, maybe that is right !
 
@Sajad Not because I said it, but because it is provable.
 
@Andrea Is it optimized that I convert always ? Is it not better to I save them as Solar ?
 
The proof being your exact use case here.
 
12:12 PM
@Sajad save the time as timestamp
 
You might want to show solar dates to people, but storing them will cause problems
 
@tereško give me a example of timestamp output ?
 
If MySQL had to actually understand the difference between one calendar and another it would be rather complex. Since it doesn't, the storage mechanism becomes simple and the format mechanism remains open to extension.
 
@Sajad 1438430596
 
@Andrea what problems ?
 
12:12 PM
@Sajad the performance doesn't matter, it's imperceptible
 
This is a sound principle in designing general purpose systems.
 
@tereško :) and how it is useful for me ?
 
@Sajad MySQL, and I think PHP, do not support the full range of operations on solar time
 
that's a number of seconds since 1970-01-01 (normal calendar)
 
@Sherif you write hardly ! I don't know english, often I did not get your mean :)
@tereško your mean is 1438430596+1970-1-1 ?
 
12:14 PM
@Sherif Huh? Iranian calendar isn't a solar calendar?
 
@Andrea aha !
@PeeHaa It is solar calendar !
 
The Solar Hijri calendar (Persian: گاه‌شماری هجری خورشیدی‎, Pashto: لمريز لېږدیز کلیز‎), also called the Solar Hejri calendar or Shamsi Hijri calendar, and abbreviated as SH, is the official calendar of Iran and Afghanistan. It begins on the vernal equinox as determined by astronomical calculation for the Iran Standard Time meridian (52.5°E or GMT+3.5h). This determination of starting moment is more accurate than the Gregorian calendar for predicting the date of the vernal equinox, because it uses astronomical observations rather than mathematical rules. Each of the twelve months corresponds with...
 
@Sajad a solar calendar
 
he's talking about this one
 
12:15 PM
it's a calendar used ONLY in Iran and Afghanistan
I find it kinda funny
 
@PeeHaa Not by my definition of Solar
 
Lots of countries have their own calendars!
 
With blackjack!
 
And @DaveRandom's mom!
 
@tereško that's hardly special
many countries have their own calendars
 
12:17 PM
@Sherif And why is that?
 
also, even those that use Gregorian deal with it differently
 
@PeeHaa Their calendar is based on observation rather than rule. More often than not that observation defies scientific evidence and entails political/social/religious agenda.
 
Still it is based on solar observation
 
Sure, we could call it that.
 
12:19 PM
@tereško this is Arabic ! they use of Lunar date!
 
Yes, you want intl for translating calendars.
 
@Sherif ...what?
 
Much more reliable.
 
All calendars are nonsense
 
Might I point out that even the West has weird calendar issues
 
@Andrea We really just should base our time on seconds since time.
 
I think all of you did not undrestand what I want, I want this:
 
@Andrea we are programmers here. We use timestampes :D
 
http://i.stack.imgur.com/b1Qws.jpg
there is any function for converting ?
 
12:22 PM
@bwoebi UNIX time one true time!
 
@bwoebi What a cool idea! brb patenting!
 
@Sajad why do you need it in the database
 
@Sajad oh, we understood. We are just saying that you are trying to solve the wrong problem.
 
[I mean the beginning of universe … where time begun to exist.]
 
@bwoebi That's roughly 2000 years ago right? :D
 
12:24 PM
@Andrea because I need to show to my users as solar !
 
@bwoebi do we know it to the necessary precision?
 
@tereško then what is your offer ?
 
@Andrea no. The only issue.
 
what would be the point of converting PHPMyAdmin to Hijri?
it's just a tool
 
@Sajad Your users don't see your database.
 
12:24 PM
@tereško I don't want to convert my phpmyadmin
 
@tereško yeah phpmyadmin sure is a tool :P
 
@Andrea but I will fetch my information in database
 
@bwoebi But we can't figure that out since we only know what happened up until a few yoctosecond before the big bang
 
17 mins ago, by tereško
SELECT OrderId, UNIX_TIMESTAMP(OrderDate) FROM Orders;
 
@Sherif before the big bang? haha.
 
12:25 PM
@Sajad Yes, but you can convert it before displaying it to the user
 
@bwoebi before the big bang occurred
Sorry, that was confusing.
 
look, I want to use of your way, like this: `1438430596`
just can tell me how can I use that later ?
@Andrea how ?
 
If you're not doing any formatting on data coming out of the database, you might as well not use PHP at all and just give users direct database access
 
@bwoebi Context from up until
 
@Sajad Sherif has already told you about intl
 
12:26 PM
@Sajad you can use it to convert it to any date format that you want
 
@tereško ok, I need to think about it
 
But who wants to be in the year 14 Billion anyway, when we've spent thousands of years convincing the world that we're in the year 2000 something
 
Morning Folks!
 
anyway, thanks (@tereško @Sherif @Andrea)
 
I am using the following code
$due_date = DateTime::createFromFormat($format, $_POST['due_date']);
I am seeing
Fatal error: Call to undefined method DateTime::createFromFormat()
version is 5.4
 
12:28 PM
Fun Calendar stuff! January 1, 1910 in Greece is not January 1, 1910 in, say, the UK, I believe
 
@Sherif Sure, the only ever important digits are the three least significant ones. The other digits are only important for archiving things.
 
@udaysagar check the manual. What version does it say it's available in?
 
@Andrea Greece has bigger problems
 
What do you do, when you're bored to the core?
 
@Sajad
Unix Epoch itself (1 Jan 1970 Gregorian, or 10 : Shawwal 22 1389 Hijri) is actually calendar-neutral
 
12:29 PM
@HassanAlthaf read a book.
 
@bwoebi fk no, I hate readin
lol
 
that's your "0 timestamp"
 
@HassanAlthaf why?
 
It bores me to the core
 
lol … why?
 
12:30 PM
@bwoebi I'm still betting on String Theory to prove that the big bang never happened so we can all do away with time
 
cuz...
I don't find 'em interesting.
 
Until man develops the technology needed to move through time I'm not buying it.
 
PHP Version 5.4.24
 
@udaysagar Are you sure you're using 5.4? Have you tried phpinfo()?
 
@Sherif That'd be interesting^^
 
12:31 PM
wtf!
 
no, let me try that
 
PHP 5.4!
Nga
fkin upgrade to 5.6
5.4 is balls
 
@Sherif It'd be enough to be able to move through space without losing time.
 
@bwoebi *losing. :)
 
@bwoebi I'm greedy
 
12:32 PM
@HassanAlthaf typo ^^
 
@HassanAlthaf 5.4 added []. For that it shall always be in my heart <3
 
@bwoebi Isn't that "just" moving at the speed of light?
:P
 
fk dat little mouse cuz im an albatroaz
3x10^8 m/s?
I don't know..
 
Shorthand array syntax is like, the BEST PHP feature EVER added. Move over, scalar type hints.
3
 
12:33 PM
PHP Version 5.2.17
 
@PeeHaa If you move at speed of light, time still passes.
 
(click star if u agree)
 
phpinfo said that it's 5.2
now, I have to convert a astring to date object
how can I do that
pls guide
 
@Andrea the best feature in PHP is......
 
@bwoebi For who(m?)
 
12:34 PM
I can't think of any
 
@PeeHaa for everyone else.
 
@udaysagar Ah, there's your problem. createFromFormat was added in 5.3. You'll need to get a newer PHP version (5.2 is really outdated anyway so you'll want to)
 
@bwoebi Exactly :-)
 
FTL travel is a thing. You just turn off all the lights and use dark energy.
 
hmm
any alternative
 
12:34 PM
bows
 
how to upgrade my php versio?
I am on shared hosting
 
uday
simple.
 
@PeeHaa It's all just a 4D vector with a fixed magnitude.
 
yea
 
Click the contact button.
And tell the customer service:
 
12:35 PM
@udaysagar How much do you pay for shared hosting? I'm willing to bet there is a VPS solution out there within the same price range if not cheaper than your shared hosting.
 
'Fkin outdated cunts, upgrade the PHP version'
 
hmm
 
Is string theory still considered FTL, because in my (limited) understanding you don't actually move
 
i am the developer
 
@tereško can you show me how you use (for yourself) of this : 1438430596 ?
 
user895378
12:36 PM
@bwoebi this.
 
@HassanAlthaf Could you watch your language in here? You're being incredibly vulgar for no reason.
 
@udaysagar your host may give you an option to change PHP version. If they don't, I suggest switching to a different host. 5.2 is very old now and insecure, and it lacks lots of useful features
 
client manages all that @SHERIF
 
Yeah @HassanAlthaf I kinda agree withg @cspray
 
@cspray soz
 
12:36 PM
ok, I will look at it @andrea
 
@rdlowrey morning :-)
 
@udaysagar Then I guess you'd better inform your client ^^
 
thanks for the guidance
 
Racial slurs and the word that you just said has no place in this chat room.
 
user895378
o/
 
12:36 PM
yes
 
@PeeHaa soz!
 
\o @rdlowrey
 
@rdlowrey sup man
 
i have control panel
login
 
This is why WordPress still runs on 5.2 ;_;
 
12:37 PM
how to changer version from here?
 
@rdlowrey Your Arya will replace FastRoute very well. RIP @NikiC
 
user895378
@HassanAlthaf It uses FastRoute?
 
?
 
but in the CP
 
@HassanAlthaf Arya uses FastRoute
 
12:37 PM
wtf
 
it shows PHP Version 5.4.24
 
grrrrr!
 
super scam!!!!!
@udaysagar are you using 000webhost?
 
@HassanAlthaf yeah, just a wrapper around it with a Request/Response API.
 
user895378
12:38 PM
@HassanAlthaf Please clean things up a bit in the future like @cspray said.
 
no idea what hosting this is
how to know that from CP?
 
@udaysagar maybe it's extension-based? Some hosts let you set the version by changing the filename
 
user895378
Achievement unlocked: first SO chat kick-mute.
 
hi
Soz.
@udaysagar what is the link of your host?
 
@udaysagar maybe you could post a screenshot of the control panel? that might help
 
12:40 PM
And clearly the best feature in PHP is anonymous functions.
 
@udaysagar I can let you host on mine, the unmetered package is $3/month.
 
@cspray Don't all programming languages have 'em?
 
@Sajad I use it kinda like this:
 
12:40 PM
Angry much?
 
@udaysagar Get onto my package, I can resell packages.
 
 $time = new \DateTime;
 $time->setTimestamp($timestamp);
 return $time->format('M d.');
 
Wow, never knew there was an object called DateTime.
Is that built in?
 
@tereško and output ?
 
@HassanAlthaf PHP didn't have them until 5.3... so quite a while really.
 
12:41 PM
@cspray PHP sucked before 5.3?
 
@HassanAlthaf newer ones tend to
 
I am done with PHP.
 
@HassanAlthaf PHP has always sucked, but it's slowly getting slightly less sucky :p
 
I had been with it for 3 years.
 
What @Andrea said
 
12:42 PM
@Sajad 3v4l.org/IqBO7 (but I can take the advantage of DateTime object being "gregorian")
 
I no longer learn new stuff in PHP, I just do what I can.
 
@cspray That's not exactly true create_functionwas around since PHP 4, but closures were only introduced in PHP 5.3
 
@tereško ok thanks
 
@Sherif Fair enough
 
@HassanAlthaf Yes. There's also functions that match the methods, for some reason.
 
12:42 PM
Admittedly I didn't do much pre 5.3 PHP programming
Thankfully
 
Admittedly, I don't wanna code anything in PHP before PHP7 is out.
 
Albeit, create_function was just an eval internally, but meh
 
I can't be bothered to re-write.
 
lambdas were still possible
 
@Sherif it barely counts, create_function's output couldn't be GCd
 
12:43 PM
Btw guys,
 
@Andrea Lots of things were wrong with Garbage Collection in the PHP 4 days
 
What is an 'Object Oriented Database Management System'
According to my sir,
It is the latest DBMS...
 
The latest?
 
There's a bunch of kinda of database, suited to different tasks
There's no catch-all
 
Others are Network, Relational and another one.
 
12:45 PM
If what you're doing works well in a relational database, keep using it.
 
How do you store data using a 'OO' DMBS?
He says using complex data structures..
 
@Sherif it still is ^^
 
But, won't the 'complex' data structures get flushed empty after the application is closed? :L
 
@HassanAlthaf It sounds like you add objects to the database, unlike a relational database where you add rows to tables
 
Oh, I see.
I wasn't sure, but I definitely wanna argue with him on that.
Just not in class, probably in FB>
*FB.
 
12:47 PM
But I don't think there's a massive difference
 
@bwoebi Oh sure, but the relevance of create_function today makes it virtually non-existent. So I decided to use past tense in order to reflect on how little I value its significance :D
 
hehe … we really ought to deprecate such functions…
 
I think anything you could do with an object database would probably work in a traditional relational database
create_function is useful still if you're evil, like me.
 
PHP oughts to be crushed and rebuilt.
It feels so good when working with Java and Swift.
PHP be like:
some_random_function(rfiajifjerfe)
java n swift be like
 
@Andrea Work and work-well are two different problems. For example, it's non-trivial to store and maintain a complex 3-dimensional nested structure like a tree in a flat 2-dimensional relational database like that of the relational database that relies on rows and columns (as in set theory).
 
12:50 PM
object.beautifulMethod(params); for all inbuilt stuff.
@Sherif Bro you're talking greek. :/
 
No, it's English I swear.
 
I feel to young here, anyone younger than me?
Let me find out using the Eloquent ORM.
$users = User::where('age', '<', '15')->get();
print_r($users);
 
Also, don't confuse beautiful for useful either.
 
filter (\(User age) -> age < 19) $ users room11
 
@Sherif phpden.info how do you do that number of websites running PHP today?
@Andrea Dang, that is beautiful syntax. What language?
 
12:53 PM
@HassanAlthaf Haskell!
 
Anonymous
Laravel: The framework for "special" people.
 
@samaYo Shit man, I don't use Laravel.
 
Only did once on clients request.
@tereško How do you know about the Hijri calendar?
 
:)
 
12:54 PM
@tereško wow ! thanks pal !
 
My friend: 'why doesn't onClick work?'
 
@Sajad I didn't write it. I just found it. Looked more or less ok.
 
Me:
'Cuz it is outdated.'
 
Looks like it requires Yii?
 
Friend: 'well it does work'
-_-
@Andrea Haskell has got a beast syntax.
 
12:55 PM
@tereško thanks for your searching !
 
@HassanAlthaf yep
 
So far, the most beautiful syntax is for Haskell and Swift.
And Objective-C :D
Apple cares about eye candy even when it comes to programming languages.
 
Objective-C is kinda weird. It's C with embedded Smalltalk
 
@Andrea it was taken from Yii. But it looks standalone. Or did I miss something?
 
@tereško Yii::t(...)
 
12:56 PM
Objective-C is hot.
 
that might be an alias for a DateTime method though
 
Abe
user image
3
 
Anyone of you know a cheap designer?
 
@Andrea Oh, fuck
 
@Abe LMFAO
 
12:57 PM
@Abe argh, I hate how Skype renders :3 as a cat
:3 is a catface. It is not a cat. How could they get this so wrong
 
Abe
lol, true
 
The third one down, that's a proper catface
 
@Andrea It's OK. They still failed to solve packet switching based voice transmission any better than the rest. So more cats helps divert attention away from the real problem.
 
@Sajad , as @Andrea pointed out, there are few lines which will trigger errors, containing Yii:t(). Those are "translation class" to a framework, from which the class was taken. You can replace $F = Yii::t('HijriShamsi', 'mon.' . $n); with simply $F = 'mon.' . $n;
 
@tereško can you?
 

« first day (1750 days earlier)      last day (3201 days later) »