logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Level.DayOfWeek on a Server (Read 246 times)
Bleeder91[NL]
Betatester
Offline


Personal Text:

Posts: 1001
Location: Location, Location, Location.
Joined: Oct 4th, 2009
Gender: Male
Level.DayOfWeek on a Server
Jun 30th, 2019 at 7:15am
Print Post  
I want to rotate some events on my server that depend on the day of the week. However it doesn't seem to be working on server-side and always returns 0. Is there a way to still get this info?
  
Back to top
 
IP Logged
 
[]KAOS[]Casey
Developer Team
Betatester
Offline


nedm

Posts: 3192
Joined: Aug 7th, 2011
Gender: Male
Re: Level.DayOfWeek on a Server
Reply #1 - Jun 30th, 2019 at 8:48am
Print Post  
a lot of those time related variables are never set.

my suggestion is use a tcplink/udplink and parse something, maybe an NTP server can simply be queried for a timestamp?

worst case is you host your own php/html page that returns day of week. I could host one of these (permanently) for you if you supply me with php page. In fact, might be worth making a mutator that can populate some of that stuff for us that aren't already updated.

do be wary of timezones, I suspect most/all NTP servers are UTC-/+ 0, or potentially offset by their physical location's timezone.
  
Back to top
 
IP Logged
 
Bleeder91[NL]
Betatester
Offline


Personal Text:

Posts: 1001
Location: Location, Location, Location.
Joined: Oct 4th, 2009
Gender: Male
Re: Level.DayOfWeek on a Server
Reply #2 - Jun 30th, 2019 at 11:11am
Print Post  
Myeah I was afraid of that, but you don't have to go through the trouble of hosting it just for me. I luckily have a backup plan by grabbing the day through the SQLite database I'm running, but the detour scripting is annoying. Oh well.
  
Back to top
 
IP Logged
 
Captain Minigaming
New Member
*
Offline


What a Wonderful Time
To Be Fe.

Posts: 4
Location: Being :|...
Joined: Apr 8th, 2019
Re: Level.DayOfWeek on a Server
Reply #3 - Aug 12th, 2019 at 11:33pm
Print Post  
CAPTAIN MINIGAMING here --

wait a Second (get it?) couldn't you just Poll the level Variables continuously and Save them.. basically you need to Advance a Day Variable every time hours or whatever Wraps...

Save it in a cfg file too. Basically, as long as the Server stays Up then it will be All Good...
  

//== The Version Wars ==//
Coming to an Unreal Installation Near You!
Back to top
IP Logged
 
Bleeder91[NL]
Betatester
Offline


Personal Text:

Posts: 1001
Location: Location, Location, Location.
Joined: Oct 4th, 2009
Gender: Male
Re: Level.DayOfWeek on a Server
Reply #4 - Aug 13th, 2019 at 8:42am
Print Post  
Nah don't need it anymore. I figured out that the engine is christian and prefers sunday as the first day of the week, hence 0. I tested this on a sunday which is why it kept coming back as 0 but was expecting a 6 or 7.
  
Back to top
 
IP Logged
 
Hyper
Board Moderator
Betatester
*****
Offline


It's Unreal.

Posts: 2994
Joined: Oct 11th, 2002
Re: Level.DayOfWeek on a Server
Reply #5 - Aug 13th, 2019 at 12:39pm
Print Post  
There never was an universal agreement about what the first day of the week should be.

https://www.timeanddate.com/calendar/days/monday.html

There is an ISO standard in which the week begins with a Monday, but it is not universally used.
https://en.wikipedia.org/wiki/ISO_8601
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo