Customize Yarn's Web UI's time format? - hadoop

Is it possible to change the time-related FORMAT in YARN's WEB UI?
In Korea, the FORMAT of a time such as YYYY/MM/DD HH:MM:SS is familiar.
I looked in yarn-site.xml but couldn't find it.

Related

Is it possible to have multiple timezones in bigquery output?

I have an app that is used worldwide and I would like to be able to see the time of day the users are using the app in their timezone, currently I get the time in the default UTC for every user.
I know it is possible to change the default timezone I report in to another, but I haven't been able to find anything for changing it to multiple timezones.
Is this possible? If so any help/ any helpful documents I could follow? I'm using SQL in bigquery.
Many thanks,

Change system timezone with Pytz

I have a Timezone in the following format: country/city (for example: America/Sao_Paulo).
I want to change with python my system's timezone (Win7) with it, is it possible to do it with Pytz and Datetime, or at all ?
Thank you !
In general, no. There is not a direct Python way to do this.
It could be done, but you would have to jump through a lot of hoops:
Use CLDR data to translate the IANA zone to a Windows zone id.
Ex. America/Sao_Paulo => E. South America Standard Time
(See the Databases section of the timezone tag wiki for more details.)
Get the appropriate Win32 security permissions.
Call into the Win32 SetTimeZone API
Caling Win32 functions from Python is done via ctypes.
Here's a walkthrough of which Win32 permissions and calls to make, although it's in C# in this sample. You will need to translate for Python.
Sounds like a lot of work to me. Not sure why you would want to do this.

Get time & date independent to the local time of client pc

How to get the Exact time and date of the client area, without depending to the local time & date of client's pc. Even if the time and/or date of that pc is set to a wrong time, I want to show the exact time and date of that timezone at my webpage.
May I calculate it using the server time and timezone of client pc and how? Or any other way to do this?
I want any solution with php, mysql, js or jQuery...
Thank you so much...
If you do it with any server side language like php, it will display server time independent of client's computer. Only client side scripts will display client pc time
like php time()
What you need to do is to guess the clients timezone. You can only make a guess. There are services where you can send the clients IP address to have it guess the geographic location, and from that figure out the timezone. But they are not reliable. The best is if you ask the client what timezone he is in.
You can then use the jstimezonedetect JS library to make a guess and let the user confirm that. Once you then know the clients timezone, you need to convert your servers time to the client time. How to do that is answered here.

How to handle date in web app?

My web server is in east coast.
I sent an email from my web server at 1PM PST time which is 4PM Eastern time.
I am resided in west coast and when I see the page, it shows 4PM which is future time for me.
How can I see 1PM, someone in east coast 4PM and so on?
The date is stored in MongoDB which is UTC. I also convert date before displaying:
#Model.DateSent.ToLocalTime().ToString();
This is how I set the time when mail is sent:
DateTime.UtcNow <-- So I am storing date in UTC already
Thanks
There are two parts to your question. The first is the mechanics of localizing a dateTime in C#. Since I'm not a Windows guy, I'll leave that to either someone else to answer or you to look up in the docs, but I'm willing to bet that ToLocalTime() has a friend that takes a TimeZone or a Locale.
The second part, which is more interesting, and something I've had to deal with a few times in the past is how to know what timezone to use. There's no right answer, but there are a few strategies:
The simplest, and perhaps the best, if there's a concept in your system of a user account
is to simply make the Locale a user preference.
If there's no concept of a user account one's always logged into there are a few ways
to go
you could make it a choice that is saved in the session, but that's a bit annoying
to force them to select every time
a better alternative might to be geocode the inbound IP address and set it from
that. There are geocoding apps, databases and services. Most cost, but I know
MaxMind has a free edition that does ok. That will mostly work. The catch is
users coming via some large private network. I live near Philadelphia. My home
network usually geocodes pretty well, though a few services place me in Delaware,
where my ISP is located. But at work, where the whole company goes out through
a single web proxy, I look like I'm in North Dakota.
more reliable, but perhaps more involved, is to grab the browser's timezone
using getTimezoneOffset() in Javascript and push the answer up to the server.
I suppose the other option might be to convert the time locally in the browser,
where the timezone is freely availiable, but that implies that the data is
coming down via AJax or similar and then being updated via JavaScript. Fine if
you're doing a app that is fundimentally Ajax RIA based, just send the data
in UTC or as a time_t. But kind of silly and annoying for a classic web app
that isn't already processing all the data client side.
My first choice would be a user preference. If that's not an option I'd probaly push the timezone from the client. And if that's too involved, go for IP geolocation.

What client(s) should be targeted in implementing an ICalendar export for events?

http://en.wikipedia.org/wiki/ICalendar
I'm working to implement an export feature for events. The link above lists tons of clients that support the ICalendar standard, but the "three big ones" I can see are Apple's iCal, Microsoft's Outlook, and Google's Gmail.
I'm starting to get the feeling that each of these client implement different parts of the "standard", and I'm unsure of what pieces of information we should be trying to export from the application so that someone can put it on their calendar (especially around recurrence).
For example, from what I understand Outlook doesn't support hourly recurrence.
Could any of you provide guidance of the "happy medium" here from a features implementation standpoint?
Secondary question, if we decide to cut features from the export (such as hourly recurrence) because it isn't supported in Outlook, should we support it in the application as well? (it is a general purpose event scheduling application, with no business specific use in mind...so we really are looking for the happy medium).
I have to say that I don't use the hourly recurrence feature as really how many people have events that repeat in the same day? I could see if someone however was to schedule when they needed to take a particular medicine at recurring times throughout the day.
I would say support full features in the application itself, but provide a warning when they go to export the calendar that all event details may not work as expected or find a way to export in a different manner for Outlook alone that does provide the hourly recurrence feature.
I use iCal in Lightning (Thunderbird) and Rainlendar.
I have used Calendaring software for years (decades) and have never had a need for repeating events within the same day. It is simple to add additional daily repeating events in the same day if it is really needed.

Resources