Following is the iCalendar that I am sending with the mail from my application
BEGIN:VCALENDAR
PRODID:-//Test Cal//EN
BEGIN:VTIMEZONE
TZID:Asia/Kolkata
TZURL:http://tzurl.org/zoneinfo/Asia/Kolkata
X-LIC-LOCATION:Asia/Kolkata
BEGIN:STANDARD
TZOFFSETFROM:+055328
TZOFFSETTO:+055320
TZNAME:HMT
DTSTART:18800101T000000
RDATE:18800101T000000
END:STANDARD
BEGIN:STANDARD
TZOFFSETFROM:+055320
TZOFFSETTO:+0630
TZNAME:BURT
DTSTART:19411001T000000
RDATE:19411001T000000
END:STANDARD
BEGIN:STANDARD
TZOFFSETFROM:+0630
TZOFFSETTO:+0530
TZNAME:IST
DTSTART:19420515T000000
RDATE:19420515T000000
RDATE:19451015T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETFROM:+0530
TZOFFSETTO:+0630
TZNAME:IST
DTSTART:19420901T000000
RDATE:19420901T000000
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20170323T084200Z
DTSTART;TZID=Asia/Kolkata:20170401T083000
DTEND;TZID=Asia/Kolkata:20170401T090000
SUMMARY:Test Summary
TZID:Asia/Kolkata
LOCATION:888-795-6545
UID:20170323T084200Z-1#fe80:0:0:0:0:100:7f:fffe%12
DESCRIPTION:Candidate Name: Tess User\nContact Phone Number: 888-256-6522
END:VEVENT
END:VCALENDAR
The actual time is 8:30 - 9:00
But when the calendar open in outlook it shows 7:30 - 8:00
Any problem with the VCALENDAR element
I have seen similar questions here but could not help.
Your VTIMEZONE component doesn't have any definitions that effect the dates in your VEVENT. They are all for the year 1942 and earlier.
Also, it doesn't make sense to put a TZID property in your VEVENT component.
Related
I'm trying to make a help command for my bot like the below:
#client.command()
async def help(ctx):
embed=discord.Embed(title="Help Command", description="The discord bot help command", color=0xe8d9d9)
embed.add_field(name="Slowmode", value="To add on slowmode do .delay (your amount of seconds for slowmode here)", inline=False)
embed.add_field(name="Ban Members", value="To ban members do .ban #usernamehere reasonhere", inline=False)
embed.add_field(name="Kick Members", value="To ban members do .kick #usernamehere reasonhere", inline=False)
embed.add_field(name="8Ball", value="To use the 8Ball do .8ball questionhere then the bot will answer you", inline=True)
embed.add_field(name="Bot Latency", value="To get the ping do .ping and it will show you the ping in ms", inline=True)
await ctx.send(embed)
When I use it, however, the bot responds in the channel with <discord.embeds.Embed object at 0x000001D29A1588B0> and not the embed
As mentioned in by Lukas Thaler, you made mistake in sending the embed. It should be await ctx.send(embed=embed).
Hope this helps!
I'm using the Legato gem to access the total number of a certain event from Google Analytics in Ruby, but I'm getting inconsistent results with the web interface.
I have a model like so:
module Analytics
class ViewedContent
extend Legato::Model
metrics :users, :new_users, :total_events
filter :my_org do
# Look u[ event_label=X AND event_action=Y
[
eql(:event_label, "My Organisation", Legato.and_join_character),
eql(:event_action, 'Viewed_Content', Legato.and_join_character)
]
end
end
end
...then I use this by doing:
query = Analytics::ViewedContent.my_org.results(profile, {
:start_date => start_date,
:end_date => end_date
})
...and looking at the totalEvents stat.
When I pass in dates in January, e.g. start_date = "2014-01-01".to_date and end_date = "2014-01-31".to_date then it works fine, and returns the identical number of totalEvents to the Google Analytics web interface.
However, when I use it in for last month, start_date = "2014-07-01".to_date and end_date = "2014-07-31".to_date then it's considerably less than in the web interface (Legato returns 555 vs 662 in the web interface).
It makes me wonder if it's something to do with British Summer Time (I'm currently in UTC+1) except that even extending the date range by a day either side doesn't bring it up to the same as what the web interface reports, which would appear to rule that out.
Any thoughts much appreciated!
With a bit of help from Query Explorer I discovered that the problem is definitely at Google's end, rather than due to Legato. The problem was with this line here:
metrics :users, :new_users, :total_events
If I changed that to just fetch :total_events then suddenly it started returning the same value as the Google Analytics web interface. I now make a separate request for :users and :new_users by looking up a segment (rather than just this filter)
I'm having trouble getting this to scan as a VCAL, right now its scanning as a text type :
http://chart.apis.google.com/chart?cht=qr&chs=350x350&chl=BEGIN%3AEVENT%0D%0D%0ASUMMARY%3ADENTAL+APPOINTMENT%0D%0ADTSTART+[Appt_Date]+[Appt_Time]%3A%0D%0A3DESCRIPTION%3ADENTAL+REMINDER%0D%0AEND%3AEVENT%0D%0A
Any ideas or help would be deeply appreciated.
Thanks
You need to use "VEVENT" - not "EVENT" - otherwise the scanner doesn't know it's a VCAL.
Here's a valid sample event:
BEGIN:VEVENT
SUMMARY:Test
DTSTART;VALUE=DATE:20120124
DTEND;VALUE=DATE:20120125
END:VEVENT
So, the chart URL you need to use is:
http://chart.apis.google.com/chart?cht=qr&chs=350x350&chld=L&choe=UTF-8&chl=BEGIN%3AVEVENT%0D%0ASUMMARY%3ATest%0D%0ADTSTART%3BVALUE%3DDATE%3A20120124%0D%0ADTEND%3BVALUE%3DDATE%3A20120125%0D%0AEND%3AVEVENT%0D%0A
I am currently using #DateTimeFormat in a domain object as follows:
#DateTimeFormat(pattern = "MM/dd/yyyy")
private Date startDate = new Date();
In a Spring MVC Controller, I am posting today's date: 10/19/2011 using the jQuery UI Date picker, and I confirm that this is being sent as an HTTP Post parameter using firebug as follows:
startDate=10%2F19%2F2011
Unfortunately, once it gets to Spring on the server, it stores the date as 10/18/2011 - there is an off-by-one day error.
There is nothing in my code that even remotely touches the date - there is no calculations or anything going on with regards to this date.
Is there something about #DateTimeFormat that I should be aware of?
Could something in Hibernate be responsible for changing the date too?
I'm also looking at the my database for this application. I am storing another date, called creationDate which is an actual timestamp and differs from user input. In most cases, the dates are the same but the client wanted the ability to set it differently so that is what startDate is for.
Start Date Creation Date (actual timestamp, not user input)
2011-04-17 19:00:00 2011-04-17 21:32:27
2011-04-18 19:00:00 2011-04-18 21:14:01
2011-04-20 19:00:00 2011-04-20 23:06:47
2011-04-26 19:00:00 2011-04-26 23:24:34
2011-04-28 19:00:00 2011-04-28 20:07:06
2011-05-01 19:00:00 2011-05-02 13:35:37
2011-06-21 19:00:00 2011-06-22 15:06:36
2011-07-28 19:00:00 2011-07-29 15:32:35
2011-09-03 19:00:00 2011-09-04 13:11:45
2011-10-11 19:00:00 2011-10-12 11:45:14
2011-10-11 19:00:00 2011-10-12 11:49:55
2011-10-18 19:00:00 2011-10-19 02:20:43
At first it seems like it was a bug started in May, but then I realized that the date is correct if it was over 19:00:00, and it's off-by-one if it's under 19:00:00.
I hate Java :(
The problem seems to occur when Spring creates a date given 10/19/2011 - it seems to translate that user input and formats it to 2011-10-18 19:00:00.
What is the simplest solution?
Thanks
It seems very likely to me that this is actually a matter of time zones. A Date object represents an instant in time - I suspect if you look at the exact value that you've got (e.g. in UTC, to keep things clear) you'll get a better idea of what's going on. Chances are that where you're seeing "10/18/2011" you're interpreting it in a different time zone.
If Spring supports converting to Joda Time types I'd suggest using that instead - then you can use LocalDate which really does mean a date instead of an instant in time.
I've found that starting your JVM with your local timezone specified in the arguments solves this issue. For me it was just adding this line to the run configuration:
-Duser.timezone="Asia/Dhaka"
Here is a piece of code I wrote to implement itunes_verification.
http://gist.github.com/raw/622038/b32accd30e86f7c714f2cffefd19857f558c8d97/gistfile1.rb
ItunesVerification.verify_apple_receipt("wefwfrw")
But, its always throwing {"exception"=>"java.lang.NullPointerException", "status"=>21002} from the itunes server.
#<HTTParty::Response:0x46d59a8 #parsed_response={"exception"=>"java.lang.NullPointerException", "status"=>21002}, #response=#<Net::HTTPOK 200 Apple WebObjects readbody=true>, #headers={"x-webobjects-loadaverage"=>["0"], "x-apple-application-site"=>["SB"], "expires"=>["Thu, 14 Oct 2010 04:24:12 GMT"], "connection"=>["keep-alive"], "edge-control"=>["no-store", "max-age=0"], "pod"=>["100"], "date"=>["Thu, 14 Oct 2010 04:24:12 GMT"], "x-apple-max-age"=>["0"], "x-apple-application-instance"=>["1000407"], "x-apple-woa-inbound-url"=>["/WebObjects/MZFinance.woa/wa/verifyReceipt?output=json&receipt-data=d2Vmd2U%3D%0A"], "content-length"=>["62"], "set-cookie"=>["Pod=100; version=\"1\"; expires=Sun, 14-Nov-2010 05:24:12 GMT; path=/; domain=.apple.com", "mzf_in=1000407; version=\"1\"; path=/WebObjects; domain=.apple.com"], "x-apple-lokamai-no-cache"=>["true"], "cache-control"=>["no-transform", "private", "no-cache", "no-store", "must-revalidate", "max-age=0"], "pragma"=>["no-cache"]}>
Also, the string I pass is encoded to Base64.
I have tried other options like changing the key from "body" to "query".
This is very urgent and any help will be greatly appreciated.
Thanks
There already is a similar problem posted, check it out here, perhaps the suggestions there can help you.