Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] hey guys, does anyone want to explain me how to work with datetime in c++?

[DiscordArchive] hey guys, does anyone want to explain me how to work with datetime in c++?

[DiscordArchive] hey guys, does anyone want to explain me how to work with datetime in c++?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
07-31-2019, 09:10 AM
#1
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:10:56.633000+00:00
Original source

hey guys, does anyone want to explain me how to work with datetime in c++?
rektbyfaith
07-31-2019, 09:10 AM #1

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:10:56.633000+00:00
Original source

hey guys, does anyone want to explain me how to work with datetime in c++?

rektbyfaith
Administrator
0
07-31-2019, 09:13 AM
#2
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:13:33.025000+00:00
Original source

I explored the cs_misc.cpp, saw that trinitycore uses last_login as string
rektbyfaith
07-31-2019, 09:13 AM #2

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:13:33.025000+00:00
Original source

I explored the cs_misc.cpp, saw that trinitycore uses last_login as string

rektbyfaith
Administrator
0
07-31-2019, 09:13 AM
#3
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:13:34.944000+00:00
Original source

lastLogin = fields[5].GetString();
rektbyfaith
07-31-2019, 09:13 AM #3

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:13:34.944000+00:00
Original source

lastLogin = fields[5].GetString();

rektbyfaith
Administrator
0
07-31-2019, 09:13 AM
#4
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:13:52.241000+00:00
Original source

how can I use it as date?
rektbyfaith
07-31-2019, 09:13 AM #4

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:13:52.241000+00:00
Original source

how can I use it as date?

rektbyfaith
Administrator
0
07-31-2019, 09:14 AM
#5
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:14:21.525000+00:00
Original source

will this
https://www.tutorialspoint.com/cplusplus/cpp_date_time
be enough?
[Embed: C++ Date and Time]
C++ Date and Time - Learn C++ in simple and easy steps starting from basic to advanced concepts with examples including C++ Overview, Environment Setup, Basic Syntax, Comments, Data Types, Variable Types, Scope, Constants/Literals, Modifier Types, Storage Classes, Operators, ...
https://www.tutorialspoint.com/cplusplus/cpp_date_time
rektbyfaith
07-31-2019, 09:14 AM #5

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:14:21.525000+00:00
Original source

will this
https://www.tutorialspoint.com/cplusplus/cpp_date_time
be enough?
[Embed: C++ Date and Time]
C++ Date and Time - Learn C++ in simple and easy steps starting from basic to advanced concepts with examples including C++ Overview, Environment Setup, Basic Syntax, Comments, Data Types, Variable Types, Scope, Constants/Literals, Modifier Types, Storage Classes, Operators, ...
https://www.tutorialspoint.com/cplusplus/cpp_date_time

rektbyfaith
Administrator
0
07-31-2019, 09:14 AM
#6
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:14:59.698000+00:00
Original source

cuz I want to make a compare between datetime from database and current datetime
rektbyfaith
07-31-2019, 09:14 AM #6

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:14:59.698000+00:00
Original source

cuz I want to make a compare between datetime from database and current datetime

rektbyfaith
Administrator
0
07-31-2019, 09:23 AM
#7
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:36.734000+00:00
Original source

oh actually found similar code for daily quests time
rektbyfaith
07-31-2019, 09:23 AM #7

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:36.734000+00:00
Original source

oh actually found similar code for daily quests time

rektbyfaith
Administrator
0
07-31-2019, 09:23 AM
#8
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:40.769000+00:00
Original source

```cpp
void World::InitDailyQuestResetTime(bool loading)
{
time_t mostRecentQuestTime = 0;

if (loading)
{
QueryResult result = CharacterDatabase.Query("SELECT MAX(time) FROM character_queststatus_daily");
if (result)
{
Field* fields = result->Fetch();
mostRecentQuestTime = time_t(fields[0].GetUInt32());
}
}
```
rektbyfaith
07-31-2019, 09:23 AM #8

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:40.769000+00:00
Original source

```cpp
void World::InitDailyQuestResetTime(bool loading)
{
time_t mostRecentQuestTime = 0;

if (loading)
{
QueryResult result = CharacterDatabase.Query("SELECT MAX(time) FROM character_queststatus_daily");
if (result)
{
Field* fields = result->Fetch();
mostRecentQuestTime = time_t(fields[0].GetUInt32());
}
}
```

rektbyfaith
Administrator
0
07-31-2019, 09:23 AM
#9
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:46.985000+00:00
Original source

I believe this will do the trick
rektbyfaith
07-31-2019, 09:23 AM #9

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:46.985000+00:00
Original source

I believe this will do the trick

rektbyfaith
Administrator
0
07-31-2019, 09:23 AM
#10
Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:47.573000+00:00
Original source

rektbyfaith
07-31-2019, 09:23 AM #10

Archived author: MR.MUSTACHE • Posted: 2019-07-31T09:23:47.573000+00:00
Original source

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)