World Time Script - scripting

I have an online website portfolio and I want to put their the current time in our country and also I want to put the weather update there. If my clients browse it they will see the time in our country.
My question is:
What script should I used?
Example: I live in Philippines so thats GMT+08:00
Then, when someone browse my website from any country they will see the Philippine current time not their computer's time.

Load the time on client side that is through java script instead of server side. Then time will be displayed based on client side time zone.
--Sameer

Related

How to get System date formate

I have an application in Vuejs (Typescript) that get date from User, I am facing two issues for the time being.
Every time the User enter date of birth system decreases one.
If user enter 03/05/1981 and the System date formate is MM/dd/yyyy it store 5th of March.
I can't tell every person to change format to dd/MM/yyyy, or is there a way around.
Thanks
By the details you have provided I assume everything happens in the browser.
Please check your browser localization settings even if your computer localization is setup as US if the browser has a different setting then it will be overwritten.
If you are sending the information to a different server please check how are you formatting the date in your request and which are the server side settings about localization.
Hope this helps.

Working with Synology Surveillance Station Web API

If is someone that worked with Synology API documentation is here
I wonder if there is any possibility to get a snapshot picture on a certain timestamp (let's say a snapshot from yesterday). I have all the recordings saved on the server grouped in videos of about ~10 min on a full day.
What I managed to do so far is to get a snapshot of the live screen with this API GET call:
http://34.59.110.237:6001/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&cameraId=3&xtamp=1486308916&preview=true&_sid=$currentsid
This will get me each time I call it a print of the current screen, somehow the xtamp=1486308916 (unix timestam) won't take any consideration. I tryed with (time,timestamp,update_time), no luck, any idea ?
The GetSnapshot method from the API SYNO.SurveillanceStation.Camera ist only for the current view.
I have no idea for your problem, but look at the "List" method from the SYNO.SurveillanceStation.Recording API.

Conversion Specs

What do you put in for the URL Object ID in conversion specs if wanting to use: {'action.type':'link_click', 'post.object':'URL_OBJECT_ID'}
In the example it says: [{"action.type":"like", "page":[133445987]}]
But I do not know where they are getting the number after page or what I would put in if I am directing people to my website. I would like to track when people click on the link and go to the website.
Thanks.
I think you put the pageID in that field- that being said I am trying to do something similiar with following code:
[{"action.type":["link_click"],"post":[xxxx1419],"post.wall":[xxxxx0152]}]
and the ad works, but it doesnt show very often (ie i ahve it set to a $10 daily budget but it only spends 1-2 per day.

See how much was donated to a particular Thing

Say you want to have a kickstarter-like site using Flattr, where you create a Thing for each individual user. How would you be able to tell (with the API) how much each user Flattr'd? It wouldn't update right away (it would have to update at the first of each month), but would it be possible at all? If there's no way to do this, could you tell how much a particular Flattr'd to you in total?
In the details of each months revenue reports there's a link to download that revenue report as a CSV-file which you could then import into your system to find out how much each thing has received. The information is not yet exposed through the API (see this question) so you would have to download the files manually - luckily there's only twelve months a year so it's not too much work to do :)
The CSV-file contains these columns:
period - Date in the format of YYYY-MM
id - The internal numeric id of the flattr thing
flattr url - The URL to the thing on Flattr.com
url - The original URL that the thing is pointing to
title
clicks - The amount of clicks for the thing during the period
revenue - The revenue for the thing during the period
clicks total
So - as you see you can't see how much each individual click has been worth if a thing has received more than one click and you can't either see which users it is that has clicked the thing (you can however see some of the users by asking the regular API for more information, but since some users are anonymous you can't figure out who they are without asking them for permission to do so).
If you really need to know if a user has flattred something, then you can force them to flattr the thing through your system by having them authenticate with your system using the Flattr API - that way you will at least know if a flattr has been made by the user or not, but you will still have trouble trying to figure out how much their flattrs are worth - but that's kind of the point with Flattr - that people should spend whatever they personally feel comfortable with rather than spending what others think they should be spending.

total visitors at any given instance

I am working on site analytics and would like to know how I can find the total number of visitors at any given instance. I am concerned only about the current time and not about past views. Right now I am trying to keep the problem simple by not finding the unique visitors.
One approach I can think of is to get total number of http connections at any given instance, assuming that the connection have very short timeout.
My setup includes apache web server and tomcat servlet container.
I know it is still a generic question but this use case is not specific to any particular language.
How about looking in the logs?
For example:
http://www.geekpad.ca/blog/post/get-unique-visitors-from-apache-log-file