Monday, July 26, 2010

Converting Local time to Unix Timestamp in Javascript

After some thought, I finally was able to come up with a javascript solution to convert the local time to a Unix timestamp.

Basically I used a few main Javascript functions: getTime(), getTimezoneOffset()

The first function (getTime) will convert the time we get from the Date() function, into a UNIX stamp. Unfortunately, when we convert this string, we won't get the local time, but the main UTC.

This is where I had to use getTimezoneOffset(). This function finds out the difference in minutes between the main UTC and your local time zone. I'm going to use the number I get from getTimezoneOffset and subtract it from the UNIX timestamp number I created. But getTimezoneOffset() is in minutes, so we'll have to convert it to the data type of the UNIX timestamp, which is milliseconds. Thus, we'll have to multiply it by 60,000 (60 seconds in a minute, and 1000 milliseconds in a second).

Below is the code I finally used (put this in a script tag):


var theDate = new Date();
var theTime = theDate.getTime();
var localMil = theDate.getTimezoneOffset()*60*1000;
document.write((theTime-localMil));


Wednesday, July 14, 2010

Race, Gender, Class in the media - How to teach your kids to realize the stereotypes

For my class in Gender, Race, Class in the media, we studied some of the psychological theories behind learning and socialization. As part of our group project, we presented a research paper concerning proper techniques for helping children to be aware of negative stereotypes and how to utilize positive ones.

Jacob Rascon, a member of our group, wrote an editorial about the issues behind many children's animated films, such as Lion King, Cinderella, and Aladdin.

I was fortunate enough to design the editorial for an 11x17 layout:

The Lion King, Disney Princesses, and Rising Above Negative Media Messages
By Jacob Rascon

Remember ‘the circle of life’ in The Lion King? What was that all about? Lions are at the top of the food chain and are therefore naturally better than all other animals—especially hyenas, who deserve their poor circumstance?

That doesn’t sound like the Disney I used to know. Remember when Princess Ariel gave up her voice? Why did she sacrifice that plus everything she’d ever known for a prince she’d never met? Not sure, but hey, she kept her looks...

Read More


Tuesday, July 13, 2010

Advertising for Queen Elizabeth I

After a little bit of work, we came up with this: 
Text:
Why Queen Bess?

Her Highness Will

  • Improve England's Industry and Trade
  • Victoriously stop the war with France
  • Promote the Arts